forked from the-distro/channel-scripts
Update the channels repo early
This way, users of the nixpkgs-channels repo don't have to wait for all the slow stuff to finish (like index generation and copying of ISOs).
This commit is contained in:
parent
7f2bbc884c
commit
038c8ee8d4
|
@ -80,6 +80,10 @@ 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. FIXME: lock?
|
||||
system("git remote update origin >&2") == 0 or die;
|
||||
system("git push channels $rev:refs/heads/$channelName >&2") == 0 or die;
|
||||
|
||||
if ($bucket->head_key("$releasePrefix/github-link")) {
|
||||
print STDERR "release already exists\n";
|
||||
} else {
|
||||
|
@ -200,7 +204,7 @@ if ($bucket->head_key("$releasePrefix/github-link")) {
|
|||
File::Path::remove_tree($tmpDir);
|
||||
}
|
||||
|
||||
# Prevent concurrent writes to the channels and the Git clone.
|
||||
# Prevent concurrent writes to the channels directory.
|
||||
open(my $lockfile, ">>", "$channelsDir/.htaccess.lock");
|
||||
flock($lockfile, LOCK_EX) or die "cannot acquire channels lock\n";
|
||||
|
||||
|
@ -219,7 +223,3 @@ 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;
|
||||
|
|
Loading…
Reference in a new issue