mirror-nixos-branch: Update the Git repo last
This commit is contained in:
parent
2f7994e3de
commit
c6428851dc
|
@ -80,15 +80,6 @@ if (defined $curReleaseDir) {
|
|||
die "channel would go back in time from $curRelease to $releaseName, bailing out\n" if $d == 1;
|
||||
}
|
||||
|
||||
# Update the nixpkgs-channels repo.
|
||||
open(my $lockfile, ">>", "$channelsDir/.htaccess.lock");
|
||||
flock($lockfile, LOCK_EX) or die "cannot acquire channels lock\n";
|
||||
|
||||
system("git remote update origin >&2") == 0 or die;
|
||||
system("git push channels $rev:refs/heads/$channelName >&2") == 0 or die;
|
||||
|
||||
flock($lockfile, LOCK_UN) or die "cannot release channels lock\n";
|
||||
|
||||
if ($bucket->head_key("$releasePrefix")) {
|
||||
print STDERR "release already exists\n";
|
||||
} else {
|
||||
|
@ -213,6 +204,7 @@ if ($bucket->head_key("$releasePrefix")) {
|
|||
}
|
||||
|
||||
# Prevent concurrent writes to the channels directory.
|
||||
open(my $lockfile, ">>", "$channelsDir/.htaccess.lock");
|
||||
flock($lockfile, LOCK_EX) or die "cannot acquire channels lock\n";
|
||||
|
||||
# Update the channel.
|
||||
|
@ -230,3 +222,9 @@ if ((read_file($channelLink, err_mode => 'quiet') // "") ne $target) {
|
|||
|
||||
system("cat $channelsDir/.htaccess-nix* > $channelsDir/.htaccess.tmp") == 0 or die;
|
||||
rename("$channelsDir/.htaccess.tmp", "$channelsDir/.htaccess") or die;
|
||||
|
||||
# Update the nixpkgs-channels repo.
|
||||
system("git remote update origin >&2") == 0 or die;
|
||||
system("git push channels $rev:refs/heads/$channelName >&2") == 0 or die;
|
||||
|
||||
flock($lockfile, LOCK_UN) or die "cannot release channels lock\n";
|
||||
|
|
Loading…
Reference in a new issue