From 62e00bfbd0dcd7891307c4569f426d5ba7eb79c0 Mon Sep 17 00:00:00 2001 From: Ali Chraghi Date: Tue, 20 Sep 2022 08:41:28 +0430 Subject: [PATCH] dev: fix zig version update script --- .github/workflows/ci.yml | 2 +- README.md | 16 ++++++++-------- dev/update-zig.sh | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94b78e49..02d22a8f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,7 +64,7 @@ jobs: Invoke-WebRequest -Uri 'https://ziglang.org/builds/zig-windows-x86_64-0.10.0-dev.4060+61aaef0b0.zip' -OutFile 'C:\zig.zip' cd C:\ 7z x zig.zip - Add-Content $env:GITHUB_PATH 'C:\zig-windows-x86_64-0.10.0-dev.3027+0e26c6149\' + Add-Content $env:GITHUB_PATH 'C:\zig-windows-x86_64-0.10.0-dev.4060+61aaef0b0\' - name: compile all examples run: zig build compile-all - name: test diff --git a/README.md b/README.md index fbb73135..348cc190 100644 --- a/README.md +++ b/README.md @@ -37,9 +37,9 @@ Mach has many libraries you can use for game development in Zig - **you don't ha ## Join the community -* [#hexops:matrix.org Matrix chat](https://matrix.to/#/#hexops:matrix.org) and [Discord server](https://discord.gg/XNG3NZgCqp), come discuss the future of game engines & graphics in Zig! -* [machengine.org](https://machengine.org) -* Follow [@machengine on Twitter](https://twitter.com/machengine) for updates. +- [#hexops:matrix.org Matrix chat](https://matrix.to/#/#hexops:matrix.org) and [Discord server](https://discord.gg/XNG3NZgCqp), come discuss the future of game engines & graphics in Zig! +- [machengine.org](https://machengine.org) +- Follow [@machengine on Twitter](https://twitter.com/machengine) for updates. Contributors are very welcome! There are lots of places you can help out with little knowledge, so feel free to join the Matrix chat and say hi! @@ -74,12 +74,12 @@ Mach is still early stages, so far we have support for building from the followi Mach works with the new self-hosted Zig compiler only. This means you'll need to use the latest Zig nightly version. -Currently we test using `0.10.0-dev.3952+9e070b653`. Newer is generally better, but you can download this version here: +Currently we test using `0.10.0-dev.4060+61aaef0b0`. Newer is generally better, but you can download this version here: -* **linux-x86_64**: https://ziglang.org/builds/zig-linux-x86_64-0.10.0-dev.4060+61aaef0b0.tar.xz) -* **windows-x86_64**: https://ziglang.org/builds/zig-windows-x86_64-0.10.0-dev.4060+61aaef0b0.zip -* **macos-x86_64** (Intel): https://ziglang.org/builds/zig-macos-x86_64-0.10.0-dev.4060+61aaef0b0.tar.xz -* **macos-aarch64** (Apple Silicon): https://ziglang.org/builds/zig-macos-aarch64-0.10.0-dev.4060+61aaef0b0.tar.xz +- **linux-x86_64**: https://ziglang.org/builds/zig-linux-x86_64-0.10.0-dev.4060+61aaef0b0.tar.xz) +- **windows-x86_64**: https://ziglang.org/builds/zig-windows-x86_64-0.10.0-dev.4060+61aaef0b0.zip +- **macos-x86_64** (Intel): https://ziglang.org/builds/zig-macos-x86_64-0.10.0-dev.4060+61aaef0b0.tar.xz +- **macos-aarch64** (Apple Silicon): https://ziglang.org/builds/zig-macos-aarch64-0.10.0-dev.4060+61aaef0b0.tar.xz `mach/ecs` and WebAssembly examples have known issues unless using `-fstage1`, see [issue #180](https://github.com/hexops/mach/issues/180) for details. diff --git a/dev/update-zig.sh b/dev/update-zig.sh index fb974642..91b67334 100755 --- a/dev/update-zig.sh +++ b/dev/update-zig.sh @@ -11,17 +11,17 @@ else fi update_zig() { - $gsed -i 's|\(Currently tested with: \).*|\1'"$1"'|' $2 + $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|' $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 else