Release script tweaks

This commit is contained in:
Eelco Dolstra 2018-02-22 17:11:17 +01:00
parent 179b896acb
commit b6dec2f3ca
No known key found for this signature in database
GPG Key ID: 8170B4726D7198DE

View File

@ -6,6 +6,7 @@ use Data::Dumper;
use File::Basename;
use File::Path;
use File::Slurp;
use File::Copy;
use JSON::PP;
use LWP::UserAgent;
@ -54,7 +55,7 @@ sub downloadFile {
my $buildInfo = decode_json(fetch("$evalUrl/job/$jobName", 'application/json'));
my $srcFile = $buildInfo->{buildproducts}->{$productNr}->{path} or die;
my $srcFile = $buildInfo->{buildproducts}->{$productNr}->{path} or die "job '$jobName' lacks product $productNr\n";
$dstName //= basename($srcFile);
my $dstFile = "$releaseDir/" . $dstName;
@ -78,9 +79,8 @@ sub downloadFile {
return ($dstFile, $sha256_expected);
}
downloadFile("tarball", "2"); # PDF
downloadFile("tarball", "3"); # .tar.bz2
my ($tarball, $tarballHash) = downloadFile("tarball", "4"); # .tar.xz
downloadFile("tarball", "2"); # .tar.bz2
my ($tarball, $tarballHash) = downloadFile("tarball", "3"); # .tar.xz
my ($tarball_i686_linux, $tarball_i686_linux_hash) = downloadFile("binaryTarball.i686-linux", "1");
my ($tarball_x86_64_linux, $tarball_x86_64_linux_hash) = downloadFile("binaryTarball.x86_64-linux", "1");
my ($tarball_aarch64_linux, $tarball_aarch64_linux_hash) = downloadFile("binaryTarball.aarch64-linux", "1");
@ -152,4 +152,9 @@ write_file("$siteDir/nix-release.tt",
system("cd $siteDir && nix-shell --run 'make nix/install nix/install.sig'") == 0 or die;
copy("$siteDir/nix/install", "$siteDir/nix/install-$version") or die;
copy("$siteDir/nix/install.sig", "$siteDir/nix/install-$version.sig") or die;
system("cd $siteDir && git add nix/install-$version nix/install-$version.sig") == 0 or die;
system("cd $siteDir && git commit -a -m 'Nix $version released'") == 0 or die;