diff --git a/src/zig/README.md b/src/zig/README.md index 1f6a4f28d..ba28af0a0 100644 --- a/src/zig/README.md +++ b/src/zig/README.md @@ -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.| diff --git a/src/zig/devcontainer-feature.json b/src/zig/devcontainer-feature.json index aa1215be1..a31c11383 100644 --- a/src/zig/devcontainer-feature.json +++ b/src/zig/devcontainer-feature.json @@ -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" } } diff --git a/src/zig/install.sh b/src/zig/install.sh old mode 100755 new mode 100644 index 6582cc62c..4a8d43ad7 --- a/src/zig/install.sh +++ b/src/zig/install.sh @@ -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