| author | |
| committer | |
| log | f545fc28b35b454b2b0167ede45aeacc0cd93387 |
| tree | 4c71ae6e0cc5ffa16c2eb14a9f8c166524c2bf06 |
| parent | 90a19f74116eb09e4711d845d08c011cb62b8cbf |
For computing the zig version number, pass --abbrev=9 rather than
requiring the user to set their git configuration in order to make zig
versions match the standard.12 files changed, 9 insertions(+), 12 deletions(-)
CMakeLists.txt+1-1| ... | @@ -45,7 +45,7 @@ if("${ZIG_VERSION}" STREQUAL "") | ... | @@ -45,7 +45,7 @@ if("${ZIG_VERSION}" STREQUAL "") |
| 45 | find_program(GIT_EXE NAMES git NAMES_PER_DIR) | 45 | find_program(GIT_EXE NAMES git NAMES_PER_DIR) |
| 46 | if(GIT_EXE) | 46 | if(GIT_EXE) |
| 47 | execute_process( | 47 | execute_process( |
| 48 | COMMAND ${GIT_EXE} -C ${CMAKE_SOURCE_DIR} describe --match *.*.* --tags | 48 | COMMAND ${GIT_EXE} -C ${CMAKE_SOURCE_DIR} describe --match *.*.* --tags --abbrev=9 |
| 49 | RESULT_VARIABLE EXIT_STATUS | 49 | RESULT_VARIABLE EXIT_STATUS |
| 50 | OUTPUT_VARIABLE GIT_DESCRIBE | 50 | OUTPUT_VARIABLE GIT_DESCRIBE |
| 51 | OUTPUT_STRIP_TRAILING_WHITESPACE | 51 | OUTPUT_STRIP_TRAILING_WHITESPACE |
build.zig+8-1| ... | @@ -263,7 +263,14 @@ pub fn build(b: *std.Build) !void { | ... | @@ -263,7 +263,14 @@ pub fn build(b: *std.Build) !void { |
| 263 | 263 | ||
| 264 | var code: u8 = undefined; | 264 | var code: u8 = undefined; |
| 265 | const git_describe_untrimmed = b.runAllowFail(&[_][]const u8{ | 265 | const git_describe_untrimmed = b.runAllowFail(&[_][]const u8{ |
| 266 | "git", "-C", b.build_root.path orelse ".", "describe", "--match", "*.*.*", "--tags", | 266 | "git", |
| 267 | "-C", | ||
| 268 | b.build_root.path orelse ".", | ||
| 269 | "describe", | ||
| 270 | "--match", | ||
| 271 | "*.*.*", | ||
| 272 | "--tags", | ||
| 273 | "--abbrev=9", | ||
| 267 | }, &code, .Ignore) catch { | 274 | }, &code, .Ignore) catch { |
| 268 | break :v version_string; | 275 | break :v version_string; |
| 269 | }; | 276 | }; |
ci/aarch64-linux-debug.sh-1| ... | @@ -16,7 +16,6 @@ export PATH="$HOME/deps/wasmtime-v2.0.2-$ARCH-linux:$PATH" | ... | @@ -16,7 +16,6 @@ export PATH="$HOME/deps/wasmtime-v2.0.2-$ARCH-linux:$PATH" |
| 16 | 16 | ||
| 17 | # Make the `zig version` number consistent. | 17 | # Make the `zig version` number consistent. |
| 18 | # This will affect the cmake command below. | 18 | # This will affect the cmake command below. |
| 19 | git config core.abbrev 9 | ||
| 20 | git fetch --unshallow || true | 19 | git fetch --unshallow || true |
| 21 | git fetch --tags | 20 | git fetch --tags |
| 22 | 21 |
ci/aarch64-linux-release.sh-1| ... | @@ -16,7 +16,6 @@ export PATH="$HOME/deps/wasmtime-v2.0.2-$ARCH-linux:$PATH" | ... | @@ -16,7 +16,6 @@ export PATH="$HOME/deps/wasmtime-v2.0.2-$ARCH-linux:$PATH" |
| 16 | 16 | ||
| 17 | # Make the `zig version` number consistent. | 17 | # Make the `zig version` number consistent. |
| 18 | # This will affect the cmake command below. | 18 | # This will affect the cmake command below. |
| 19 | git config core.abbrev 9 | ||
| 20 | git fetch --unshallow || true | 19 | git fetch --unshallow || true |
| 21 | git fetch --tags | 20 | git fetch --tags |
| 22 | 21 |
ci/aarch64-macos-debug.sh-1| ... | @@ -17,7 +17,6 @@ cd $ZIGDIR | ... | @@ -17,7 +17,6 @@ cd $ZIGDIR |
| 17 | 17 | ||
| 18 | # Make the `zig version` number consistent. | 18 | # Make the `zig version` number consistent. |
| 19 | # This will affect the cmake command below. | 19 | # This will affect the cmake command below. |
| 20 | git config core.abbrev 9 | ||
| 21 | git fetch --unshallow || true | 20 | git fetch --unshallow || true |
| 22 | git fetch --tags | 21 | git fetch --tags |
| 23 | 22 |
ci/aarch64-macos-release.sh-1| ... | @@ -17,7 +17,6 @@ cd $ZIGDIR | ... | @@ -17,7 +17,6 @@ cd $ZIGDIR |
| 17 | 17 | ||
| 18 | # Make the `zig version` number consistent. | 18 | # Make the `zig version` number consistent. |
| 19 | # This will affect the cmake command below. | 19 | # This will affect the cmake command below. |
| 20 | git config core.abbrev 9 | ||
| 21 | git fetch --unshallow || true | 20 | git fetch --unshallow || true |
| 22 | git fetch --tags | 21 | git fetch --tags |
| 23 | 22 |
ci/aarch64-windows.ps1-1| ... | @@ -24,7 +24,6 @@ function CheckLastExitCode { | ... | @@ -24,7 +24,6 @@ function CheckLastExitCode { |
| 24 | 24 | ||
| 25 | # Make the `zig version` number consistent. | 25 | # Make the `zig version` number consistent. |
| 26 | # This will affect the `zig build` command below which uses `git describe`. | 26 | # This will affect the `zig build` command below which uses `git describe`. |
| 27 | git config core.abbrev 9 | ||
| 28 | git fetch --tags | 27 | git fetch --tags |
| 29 | 28 | ||
| 30 | if ((git rev-parse --is-shallow-repository) -eq "true") { | 29 | if ((git rev-parse --is-shallow-repository) -eq "true") { |
ci/x86_64-linux-debug.sh-1| ... | @@ -16,7 +16,6 @@ export PATH="$HOME/deps/wasmtime-v2.0.2-$ARCH-linux:$HOME/deps/qemu-linux-x86_64 | ... | @@ -16,7 +16,6 @@ export PATH="$HOME/deps/wasmtime-v2.0.2-$ARCH-linux:$HOME/deps/qemu-linux-x86_64 |
| 16 | 16 | ||
| 17 | # Make the `zig version` number consistent. | 17 | # Make the `zig version` number consistent. |
| 18 | # This will affect the cmake command below. | 18 | # This will affect the cmake command below. |
| 19 | git config core.abbrev 9 | ||
| 20 | git fetch --unshallow || true | 19 | git fetch --unshallow || true |
| 21 | git fetch --tags | 20 | git fetch --tags |
| 22 | 21 |
ci/x86_64-linux-release.sh-1| ... | @@ -16,7 +16,6 @@ export PATH="$HOME/deps/wasmtime-v2.0.2-$ARCH-linux:$HOME/deps/qemu-linux-x86_64 | ... | @@ -16,7 +16,6 @@ export PATH="$HOME/deps/wasmtime-v2.0.2-$ARCH-linux:$HOME/deps/qemu-linux-x86_64 |
| 16 | 16 | ||
| 17 | # Make the `zig version` number consistent. | 17 | # Make the `zig version` number consistent. |
| 18 | # This will affect the cmake command below. | 18 | # This will affect the cmake command below. |
| 19 | git config core.abbrev 9 | ||
| 20 | git fetch --unshallow || true | 19 | git fetch --unshallow || true |
| 21 | git fetch --tags | 20 | git fetch --tags |
| 22 | 21 |
ci/x86_64-macos-release.sh-1| ... | @@ -22,7 +22,6 @@ cd $ZIGDIR | ... | @@ -22,7 +22,6 @@ cd $ZIGDIR |
| 22 | 22 | ||
| 23 | # Make the `zig version` number consistent. | 23 | # Make the `zig version` number consistent. |
| 24 | # This will affect the cmake command below. | 24 | # This will affect the cmake command below. |
| 25 | git config core.abbrev 9 | ||
| 26 | git fetch --unshallow || true | 25 | git fetch --unshallow || true |
| 27 | git fetch --tags | 26 | git fetch --tags |
| 28 | 27 |
ci/x86_64-windows-debug.ps1-1| ... | @@ -23,7 +23,6 @@ function CheckLastExitCode { | ... | @@ -23,7 +23,6 @@ function CheckLastExitCode { |
| 23 | 23 | ||
| 24 | # Make the `zig version` number consistent. | 24 | # Make the `zig version` number consistent. |
| 25 | # This will affect the `zig build` command below which uses `git describe`. | 25 | # This will affect the `zig build` command below which uses `git describe`. |
| 26 | git config core.abbrev 9 | ||
| 27 | git fetch --tags | 26 | git fetch --tags |
| 28 | 27 | ||
| 29 | if ((git rev-parse --is-shallow-repository) -eq "true") { | 28 | if ((git rev-parse --is-shallow-repository) -eq "true") { |
ci/x86_64-windows-release.ps1-1| ... | @@ -23,7 +23,6 @@ function CheckLastExitCode { | ... | @@ -23,7 +23,6 @@ function CheckLastExitCode { |
| 23 | 23 | ||
| 24 | # Make the `zig version` number consistent. | 24 | # Make the `zig version` number consistent. |
| 25 | # This will affect the `zig build` command below which uses `git describe`. | 25 | # This will affect the `zig build` command below which uses `git describe`. |
| 26 | git config core.abbrev 9 | ||
| 27 | git fetch --tags | 26 | git fetch --tags |
| 28 | 27 | ||
| 29 | if ((git rev-parse --is-shallow-repository) -eq "true") { | 28 | if ((git rev-parse --is-shallow-repository) -eq "true") { |