forked from the-distro/channel-scripts
Record top-level store paths of each release
We need this to do garbage collection on cache.nixos.org now that MANIFEST is gone.
This commit is contained in:
parent
f7beae78eb
commit
a058826231
|
@ -8,6 +8,7 @@ use File::Path;
|
|||
use File::Slurp;
|
||||
use JSON::PP;
|
||||
use LWP::UserAgent;
|
||||
use List::MoreUtils qw(uniq);
|
||||
|
||||
my $branch = $ARGV[0];
|
||||
my $jobset = $ARGV[1];
|
||||
|
@ -60,13 +61,18 @@ if (-d $releaseDir) {
|
|||
print STDERR "release already exists\n";
|
||||
} else {
|
||||
my $tmpDir = dirname($releaseDir) . "/$releaseName-tmp";
|
||||
print STDERR "$tmpDir\n";
|
||||
File::Path::make_path($tmpDir);
|
||||
|
||||
write_file("$tmpDir/src-url", $evalUrl);
|
||||
write_file("$tmpDir/git-revision", $rev);
|
||||
write_file("$tmpDir/binary-cache-url", "https://cache.nixos.org");
|
||||
|
||||
if (! -e "$tmpDir/store-paths.xz") {
|
||||
my $storePaths = decode_json(fetch("$evalUrl/store-paths", 'application/json'));
|
||||
write_file("$tmpDir/store-paths", join("\n", uniq(@{$storePaths})) . "\n");
|
||||
system("xz", "$tmpDir/store-paths") == 0 or die;
|
||||
}
|
||||
|
||||
# Copy the manual.
|
||||
if (! -e "$tmpDir/manual") {
|
||||
my $manualInfo = decode_json(fetch("$evalUrl/job/nixos.manual.x86_64-linux", 'application/json'));
|
||||
|
|
Loading…
Reference in a new issue