Skip to content

Commit

Permalink
fix: force push with lease
Browse files Browse the repository at this point in the history
prevents losing commits

Signed-off-by: Andrew Berezovskyi <andriib@kth.se>
  • Loading branch information
berezovskyi committed Jul 17, 2023
1 parent 58e9058 commit d533842
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion publisher.zig
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ fn commitAndPushRepoChange(log_repo_path: []const u8) !void {
}

fn pushRepoChange(log_repo_path: []const u8) !void {
try runNoCapture(log_repo_path, &[_][]const u8 {"git", "push", "origin", "HEAD:live", "-f"});
try runNoCapture(log_repo_path, &[_][]const u8 {"git", "push", "origin", "HEAD:live", "--force-with-lease"});
// don't push to GH more frequently than once in 15 minutes
std.time.sleep(@as(u64, 15 * 60) * std.time.ns_per_s);
}
Expand Down

0 comments on commit d533842

Please sign in to comment.