From e3603a986503c3a8001a41e03d23f1e7792f0770 Mon Sep 17 00:00:00 2001 From: octocamocoder47 Date: Wed, 5 Nov 2025 00:30:18 +0530 Subject: [PATCH 1/2] fix(zig): update README and JSON options for Zig version selection --- src/zig/README.md | 2 ++ src/zig/devcontainer-feature.json | 8 ++++++-- src/zig/install.sh | 6 +++++- 3 files changed, 13 insertions(+), 3 deletions(-) mode change 100755 => 100644 src/zig/install.sh 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..778ac3362 --- a/src/zig/install.sh +++ b/src/zig/install.sh @@ -36,7 +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') +if [[ "$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') From 7d54c79ca65281d2230bd0788523f602a068f641 Mon Sep 17 00:00:00 2001 From: octocamocoder47 Date: Wed, 5 Nov 2025 01:18:18 +0530 Subject: [PATCH 2/2] fixed syntax error --- src/zig/install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/zig/install.sh b/src/zig/install.sh index 778ac3362..4a8d43ad7 100644 --- a/src/zig/install.sh +++ b/src/zig/install.sh @@ -40,8 +40,7 @@ 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') -if [[ "$ZIG_VERSION" == "lts" ]] -then +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