aboutsummaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorDave Gauer <dave@ratfactor.com>2021-04-23 12:40:20 -0400
committerDave Gauer <dave@ratfactor.com>2021-04-23 12:40:20 -0400
commit91935bac203193baf492d996cc6b1b231d6ed384 (patch)
tree77f9fd805ec3af8fc6f72b10742197cc3cba959c /build.zig
parent5a7c4d07793e7193911372ee34195dfc64dd7e70 (diff)
downloadziglings-91935bac203193baf492d996cc6b1b231d6ed384.tar.gz
ziglings-91935bac203193baf492d996cc6b1b231d6ed384.tar.bz2
ziglings-91935bac203193baf492d996cc6b1b231d6ed384.tar.xz
ziglings-91935bac203193baf492d996cc6b1b231d6ed384.zip
make global required version in build script
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig17
1 files changed, 10 insertions, 7 deletions
diff --git a/build.zig b/build.zig
index e234c9c..b4f0b29 100644
--- a/build.zig
+++ b/build.zig
@@ -4,6 +4,11 @@ const Step = std.build.Step;
const assert = std.debug.assert;
const print = std.debug.print;
+// When changing this version, be sure to also update README.md in two places:
+// 1) Getting Started
+// 2) Version Changes
+const needed_version = std.SemanticVersion.parse("0.8.0-dev.1983") catch unreachable;
+
const Exercise = struct {
/// main_file must have the format key_name.zig.
/// The key will be used as a shorthand to build
@@ -366,10 +371,6 @@ fn checkVersion() bool {
return false;
}
- // When changing this version, be sure to also update README.md in two places:
- // 1) Getting Started
- // 2) Version Changes
- const needed_version = std.SemanticVersion.parse("0.8.0-dev.1983") catch unreachable;
const version = std.builtin.zig_version;
const order = version.order(needed_version);
return order != .lt;
@@ -391,12 +392,14 @@ pub fn build(b: *Builder) void {
\\
\\Ziglings requires development build
\\
- \\ 0.8.0-dev.1065
+ \\ {}
\\
\\or higher. Please download a development ("master") build from
- \\https://ziglang.org/download/
\\
- , .{});
+ \\ https://ziglang.org/download/
+ \\
+ \\
+ , .{needed_version});
std.os.exit(0);
}