summaryrefslogtreecommitdiff
path: root/tool/make-snapshot
diff options
context:
space:
mode:
Diffstat (limited to 'tool/make-snapshot')
-rwxr-xr-xtool/make-snapshot8
1 files changed, 8 insertions, 0 deletions
diff --git a/tool/make-snapshot b/tool/make-snapshot
index 1052487000..6003fb1b4e 100755
--- a/tool/make-snapshot
+++ b/tool/make-snapshot
@@ -6,6 +6,7 @@ require 'digest/sha2'
require 'fileutils'
require 'shellwords'
require 'tmpdir'
+require 'pathname'
require File.expand_path("../vcs", __FILE__)
require File.expand_path("../colorize", __FILE__)
STDOUT.sync = true
@@ -17,6 +18,7 @@ $keep_temp ||= nil
$patch_file ||= nil
$packages ||= nil
$digests ||= nil
+$s3 ||= nil
$tooldir = File.expand_path("..", __FILE__)
$unicode_version = nil if ($unicode_version ||= nil) == ""
$colorize = Colorize.new
@@ -37,6 +39,7 @@ options:
(#{SVNURL})
-git[=URL] make snapshot from GIT repository
(#{GITURL})
+ -s3=PATH s3 bucket path(default=tmp)
-help, --help show this message
version:
trunk, stable, branches/*, tags/*, X.Y, X.Y.Z, X.Y.Z-pL
@@ -466,6 +469,11 @@ revisions.collect {|rev| package(vcs, rev, destdir, tmp)}.flatten.each do |name|
next
end
str = open(name, "rb") {|f| f.read}
+ if $s3
+ `aws s3 cp #{name} s3://ftp.r-l.o/pub/#{$s3}/#{Pathname(name).basename}`
+ FileUtils.rm_f name
+ name = "https://s3.amazonaws.com/ftp.r-l.o/pub/#{$s3}/#{Pathname(name).basename}"
+ end
puts "* #{$colorize.pass(name)}"
puts " SIZE: #{str.bytesize} bytes"
$digests.each do |alg|