1
Fork 0

[docs] how to test your own zig version

This commit is contained in:
Motiejus Jakštys 2022-02-05 17:13:45 +02:00
parent 8d110a392a
commit 424b1ca27d
1 changed files with 25 additions and 0 deletions

25
contrib/own_zig.md Normal file
View File

@ -0,0 +1,25 @@
How to test a different version of zig
--------------------------------------
Assume you want to test an unreleased version of zig. Here's how:
- build zig in `build/` directory, following the official instructions.
- pack it to something that looks like a release using this script:
```bash
#!/bin/bash
set -xeuo pipefail
archversion="zig-linux-x86_64-$(git describe)"
dst="$HOME/rel/$archversion/"
rm -fr "$dst"
mkdir -p "$dst"/docs
cp zig "$dst"
cp -r ../lib "$dst"
tar -C "$HOME/rel" -cJf "$HOME/$archversion.tar.xz" .
```
- send it to jakstys.lt or your mirror.
- point toolchain/defs.bzl to the new version.
- run tests (probably locally, where zig was built).
- running this on sr.ht is left as an exercise for further tests.