Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/zig/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Zig is a general-purpose programming language and toolchain for maintaining robu
| Options Id | Description | Type | Default Value |
|-----|-----|-----|-----|
| version | Select the Zig version you would like to install | string | latest |
| latest | This is latest version of zig which is still not released yet. Under development for developers use. You can use it as Beta release and post any issues on zig github repo.|
| lts | This is the Last released version of zig which is more stable and efficient.|



Expand Down
8 changes: 6 additions & 2 deletions src/zig/devcontainer-feature.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@
"type": "string",
"proposals": [
"latest",
"0.10.0"
"lts",
"0.15.2",
"0.14.1",
"0.13.0",
"0.12.1"
],
"default": "latest",
"default": "lts",
"description": "Select the Zig version you would like to install"
}
}
Expand Down
5 changes: 4 additions & 1 deletion src/zig/install.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ mkdir -p /usr/local/lib/zig

INDEX_URL="https://ziglang.org/download/index.json"

if [[ "$ZIG_VERSION" == "latest" || "$ZIG_VERSION" == "current" || "$ZIG_VERSION" == "lts" ]]
if [[ "$ZIG_VERSION" == "latest" || "$ZIG_VERSION" == "current" ]]
then
# for latest we download the latest *release* version
DOWNLOAD_URL=$(curl -sSL $INDEX_URL | jq -r 'to_entries[0].value."'"$ARCH"'-linux".tarball')
elif [[ "$ZIG_VERSION" == "lts" ]]; then
# for latest we download the latest *release* version
DOWNLOAD_URL=$(curl -sSL $INDEX_URL | jq -r 'to_entries[1].value."'"$ARCH"'-linux".tarball')
else
Expand Down