From 90bca96627d074adaad29d6f6d435c2fc39da923 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Fri, 30 Dec 2022 12:51:18 -0700 Subject: [PATCH] dev: remove update-zig script (Wrench now does this) Wrench now automatically sends PRs to update Zig: * https://github.com/hexops/mach/pull/655 * https://github.com/hexops/mach-examples/pull/23 Signed-off-by: Stephen Gutekanst --- dev/update-zig.sh | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100755 dev/update-zig.sh diff --git a/dev/update-zig.sh b/dev/update-zig.sh deleted file mode 100755 index ba68299c..00000000 --- a/dev/update-zig.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail -cd "$(dirname "${BASH_SOURCE[0]}")"/.. - -# the sed in macOS is pretty old so users -# have to to use gsed which can be installed via homebrew -if [[ "$OSTYPE" == "linux-gnu"* ]]; then - gsed=$(which sed) -else - gsed=gsed -fi - -update_zig() { - $gsed -i 's|\(Currently we test using\ \)`.*`|\1'"\`$1\`|" $2 - $gsed -i 's|\(https://ziglang.org/builds/zig-[^/ -]*-[^/ -]*-\)[^/ ]*\(\(\.tar\.xz\)[^/ ]*\)|\1'"$1"'\2|' $2 - $gsed -i 's|\(https://ziglang.org/builds/zig-[^/ -]*-[^/ -]*-\)[^/ ]*\(\(\.zip\)[^/ ]*\)|\1'"$1"'\2|' $2 - $gsed -i 's|\(C:\\zig-[^/ -]*-[^/ -]*-\)[^/ \\]*|\1'"$1|" $2 -} - -if [ -n "${ZIG_VERSION:-}" ]; then - version="${ZIG_VERSION:-}" - - update_zig "$version" README.md - - sources=$(find . | grep './.github/workflows' | grep -v 'third_party/' | grep -v 'DirectXShaderCompiler' | grep '\.yml') - echo "$sources" | while read line ; do update_zig "$version" "$line" ; done - - # If running inside mach-examples/libs/mach, also update the mach-examples repo. - sources=$(find ../../.github/ | grep '/workflows/' | grep '\.yml') - echo "$sources" | while read line ; do update_zig "$version" "$line" ; done -else - echo "must specify e.g. ZIG_VERSION=0.10.0-dev.2017+a0a2ce92c" - exit 0 -fi