Compare commits
1 Commits
d0dd2507d4
...
6d14fc1c68
Author | SHA1 | Date | |
---|---|---|---|
6d14fc1c68 |
|
@ -17,8 +17,9 @@ steps:
|
||||||
- tar x -C /usr/local -f zig-linux-x86_64-0.9.0.tar.xz
|
- tar x -C /usr/local -f zig-linux-x86_64-0.9.0.tar.xz
|
||||||
- rm /usr/local/bin/zig
|
- rm /usr/local/bin/zig
|
||||||
- ln -s /usr/local/zig-linux-x86_64-0.9.0/zig /usr/local/bin/zig
|
- ln -s /usr/local/zig-linux-x86_64-0.9.0/zig /usr/local/bin/zig
|
||||||
|
- apt-get install -y git
|
||||||
- (cd codegen && zig build test)
|
- (cd codegen && zig build test)
|
||||||
- zig build # implicitly does a codegen
|
- zig build -Dfetch # implicitly does a codegen
|
||||||
- zig build test
|
- zig build test
|
||||||
- name: notify
|
- name: notify
|
||||||
image: plugins/matrix
|
image: plugins/matrix
|
||||||
|
|
|
@ -84,10 +84,7 @@ fn getGitVersion(allocator: std.mem.Allocator, git_working_root: ?[]const u8, en
|
||||||
// 2022-01-12 12:21:28 -0800
|
// 2022-01-12 12:21:28 -0800
|
||||||
// HEAD -> zig-native
|
// HEAD -> zig-native
|
||||||
|
|
||||||
if (std.os.getenv("DRONE_COMMIT_SHA") != null)
|
const log_output = run(
|
||||||
return getGitVersionFromDrone(allocator);
|
|
||||||
|
|
||||||
const log_output = try run(
|
|
||||||
allocator,
|
allocator,
|
||||||
&[_][]const u8{
|
&[_][]const u8{
|
||||||
"git",
|
"git",
|
||||||
|
@ -97,7 +94,11 @@ fn getGitVersion(allocator: std.mem.Allocator, git_working_root: ?[]const u8, en
|
||||||
},
|
},
|
||||||
git_working_root,
|
git_working_root,
|
||||||
env,
|
env,
|
||||||
);
|
) catch |e| {
|
||||||
|
if (std.os.getenv("DRONE_COMMIT_SHA") != null)
|
||||||
|
return getGitVersionFromDrone(allocator);
|
||||||
|
return e;
|
||||||
|
};
|
||||||
defer allocator.free(log_output);
|
defer allocator.free(log_output);
|
||||||
const line_data = try getLines(allocator, 4, log_output);
|
const line_data = try getLines(allocator, 4, log_output);
|
||||||
const hash = line_data[0];
|
const hash = line_data[0];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user