mirror of
https://github.com/ziglang/zig.git
synced 2025-12-16 19:23:08 +00:00
Bump Zig version to 0.7.0
This commit is contained in:
parent
0c90ccc297
commit
61507d95d8
@ -11,7 +11,7 @@ const fs = std.fs;
|
|||||||
const InstallDirectoryOptions = std.build.InstallDirectoryOptions;
|
const InstallDirectoryOptions = std.build.InstallDirectoryOptions;
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
|
|
||||||
const zig_version = std.builtin.Version{ .major = 0, .minor = 6, .patch = 0 };
|
const zig_version = std.builtin.Version{ .major = 0, .minor = 7, .patch = 0 };
|
||||||
|
|
||||||
pub fn build(b: *Builder) !void {
|
pub fn build(b: *Builder) !void {
|
||||||
b.setPreferredReleaseMode(.ReleaseFast);
|
b.setPreferredReleaseMode(.ReleaseFast);
|
||||||
@ -128,11 +128,11 @@ pub fn build(b: *Builder) !void {
|
|||||||
break :s b.fmt("dirty{x}", .{@truncate(u32, dirty_hash)});
|
break :s b.fmt("dirty{x}", .{@truncate(u32, dirty_hash)});
|
||||||
};
|
};
|
||||||
|
|
||||||
// This will look like e.g. "0.6.0^0" for a tag commit.
|
// This will look like e.g. "0.7.0^0" for a tag commit.
|
||||||
if (mem.endsWith(u8, git_sha_trimmed, "^0")) {
|
if (mem.endsWith(u8, git_sha_trimmed, "^0")) {
|
||||||
const git_ver_string = git_sha_trimmed[0 .. git_sha_trimmed.len - 2];
|
const git_ver_string = git_sha_trimmed[0 .. git_sha_trimmed.len - 2];
|
||||||
if (!mem.eql(u8, git_ver_string, version_string)) {
|
if (!mem.eql(u8, git_ver_string, version_string)) {
|
||||||
std.debug.print("Expected git tag '{}', found '{}'", .{ version_string, git_ver_string });
|
std.debug.print("Expected git tag '{}', found '{}'\n", .{ version_string, git_ver_string });
|
||||||
std.process.exit(1);
|
std.process.exit(1);
|
||||||
}
|
}
|
||||||
break :v b.fmt("{}{}", .{ version_string, dirty_suffix });
|
break :v b.fmt("{}{}", .{ version_string, dirty_suffix });
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user