aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-08-25 12:47:38 +0200
committerGitHub <noreply@github.com>2020-08-25 12:47:38 +0200
commit3ccf3801fb1c3aac6a170318d367bc2e75ac590e (patch)
treedfa392c7cbc9b2c8de61f407690789e014f1f8a1
parent2530cc68272b176841f8cf2ec0da1c88a13d9137 (diff)
parent8ce88adad9728142e1f11f7e00d2f31925f8fdd1 (diff)
Merge pull request #3948 from garbas/fix-3947
set Content-Type to "text/plain" for install script
-rwxr-xr-xmaintainers/upload-release.pl11
1 files changed, 10 insertions, 1 deletions
diff --git a/maintainers/upload-release.pl b/maintainers/upload-release.pl
index 91ae896d6..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;
}
}