diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-10-17 17:25:17 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-10-17 17:25:17 +0000 |
commit | 2546c63373149dea1511b892a9911768bd770cac (patch) | |
tree | 8766f3de7a9cd344e5b9067f83091ae7a28cfd0c /maintainers | |
parent | 7349f257da8278af9aae35544b15c9a204e2a57b (diff) | |
parent | f66bbd8c7bb1472facf8917e58e3cd4f6ddfa1b5 (diff) |
Merge commit 'f66bbd8c7bb1472facf8917e58e3cd4f6ddfa1b5' into auto-uid-allocation
Diffstat (limited to 'maintainers')
-rwxr-xr-x | maintainers/upload-release.pl | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/maintainers/upload-release.pl b/maintainers/upload-release.pl index baefe0f12..6f3882a12 100755 --- a/maintainers/upload-release.pl +++ b/maintainers/upload-release.pl @@ -117,7 +117,16 @@ for my $fn (glob "$tmpDir/*") { my $dstKey = "$releaseDir/" . $name; unless (defined $releasesBucket->head_key($dstKey)) { print STDERR "uploading $fn to s3://$releasesBucketName/$dstKey...\n"; - $releasesBucket->add_key_filename($dstKey, $fn) + + my $configuration = (); + $configuration->{content_type} = "application/octet-stream"; + + if ($fn =~ /.sha256|.asc|install/) { + # Text files + $configuration->{content_type} = "text/plain"; + } + + $releasesBucket->add_key_filename($dstKey, $fn, $configuration) or die $releasesBucket->err . ": " . $releasesBucket->errstr; } } @@ -170,15 +179,5 @@ $channelsBucket->add_key( chdir("/home/eelco/Dev/nix-pristine") or die; system("git remote update origin") == 0 or die; system("git tag --force --sign $version $nixRev -m 'Tagging release $version'") == 0 or die; - -# Update the website. -my $siteDir = "/home/eelco/Dev/nixos-homepage-pristine"; - -system("cd $siteDir && git pull") == 0 or die; - -write_file("$siteDir/nix-release.tt", - "[%-\n" . - "latestNixVersion = \"$version\"\n" . - "-%]\n"); - -system("cd $siteDir && git commit -a -m 'Nix $version released'") == 0 or die; +system("git push --tags") == 0 or die; +system("git push --force-with-lease origin $nixRev:refs/heads/latest-release") == 0 or die; |