-
Notifications
You must be signed in to change notification settings - Fork 545
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This moves multiversion from release.zig to build.zig, so that you can just build a multiversion binary normally, eg: ``` $ ./zig/zig build -Dmultiversion=0.15.6 -Dconfig-release=0.15.7 -Dconfig-release-client-min=0.15.6 -Dtarget=x86_64-linux $ ./tigerbeetle multiversion ./tigerbeetle multiversioning.exe_path=./tigerbeetle multiversioning.absolute_exe_path=/home/matklad/p/tb/work/tigerbeetle multiversioning.releases_bundled={ 0.15.3, 0.15.4, 0.15.5, 0.15.6, 0.15.7 } ... ``` You can pass `-Dmultiversion=latest` to fetch the latest release from GitHub. Note that `-Dtarget=aarch64-macos` will build a _universal_ macos image (this _is_ confusing flag name, but I don't see a simple non-ambigious solution here). As a bonus, multiversion build now should work on any host, and not on x86_64 linux only. Implementation wise, the bulk of work happens in `build_multiversion.zig` program, which is invoked from build.zig as a custom Run step. Why not encode all that logic direcctly into build.zig? The main reason is adrewrk, the most famous Zig troll. His favorite way of trolling Zig developers is by regularly breaking the API of build.zig: ziglang/zig#14498 The next planned trolling is to separate "configure" and "make" phases of `build.zig` into physically separate processes, and remove support for custom steps: ziglang/zig#20981 In this PR, we are going to troll adrewrk _back_ by fixing our code even before it gets broken, and by making our custom step a Run step instead. That being said, it I have split `gh release download` into a separate step, so that is properly cached.
- Loading branch information
Showing
4 changed files
with
1,015 additions
and
794 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.