build: eliminate duplicate version string
There is now a single source of truth for river's version. It is no longer possible for the versions in build.zig and build.zig.zon to get out of sync as build.zig now parses the version from build.zig.zon.
This commit is contained in:
parent
8f4a746da0
commit
60f954c2b0
34
build.zig
34
build.zig
@ -6,12 +6,6 @@ const mem = std.mem;
|
|||||||
|
|
||||||
const Scanner = @import("wayland").Scanner;
|
const Scanner = @import("wayland").Scanner;
|
||||||
|
|
||||||
/// While a river release is in development, this string should contain the version in development
|
|
||||||
/// with the "-dev" suffix.
|
|
||||||
/// When a release is tagged, the "-dev" suffix should be removed for the commit that gets tagged.
|
|
||||||
/// Directly after the tagged commit, the version should be bumped and the "-dev" suffix added.
|
|
||||||
const version = "0.3.8-dev";
|
|
||||||
|
|
||||||
pub fn build(b: *Build) !void {
|
pub fn build(b: *Build) !void {
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
@ -291,3 +285,31 @@ pub fn build(b: *Build) !void {
|
|||||||
test_step.dependOn(&run_globber_test.step);
|
test_step.dependOn(&run_globber_test.step);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const version = manifest.version;
|
||||||
|
/// Getting rid of this wart requires upstream zig improvements.
|
||||||
|
/// See: https://github.com/ziglang/zig/issues/22775
|
||||||
|
const manifest: struct {
|
||||||
|
name: @Type(.enum_literal),
|
||||||
|
version: []const u8,
|
||||||
|
paths: []const []const u8,
|
||||||
|
dependencies: struct {
|
||||||
|
pixman: struct {
|
||||||
|
url: []const u8,
|
||||||
|
hash: []const u8,
|
||||||
|
},
|
||||||
|
wayland: struct {
|
||||||
|
url: []const u8,
|
||||||
|
hash: []const u8,
|
||||||
|
},
|
||||||
|
wlroots: struct {
|
||||||
|
url: []const u8,
|
||||||
|
hash: []const u8,
|
||||||
|
},
|
||||||
|
xkbcommon: struct {
|
||||||
|
url: []const u8,
|
||||||
|
hash: []const u8,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
fingerprint: u64,
|
||||||
|
} = @import("build.zig.zon");
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
.{
|
.{
|
||||||
.name = .river,
|
.name = .river,
|
||||||
|
// While a river release is in development, this string should contain
|
||||||
|
// the version in development with the "-dev" suffix.
|
||||||
|
// When a release is tagged, the "-dev" suffix should be removed for the
|
||||||
|
// commit that gets tagged. Directly after the tagged commit, the version
|
||||||
|
// should be bumped and the "-dev" suffix added.
|
||||||
.version = "0.3.9-dev",
|
.version = "0.3.9-dev",
|
||||||
.paths = .{""},
|
.paths = .{""},
|
||||||
.dependencies = .{
|
.dependencies = .{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user