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 <stephen@hexops.com>
This commit is contained in:
parent
fe590407d2
commit
90bca96627
1 changed files with 0 additions and 34 deletions
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue