forked from Revolutionary-Games/Thrive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
upload_devbuilds.rb
executable file
·36 lines (29 loc) · 1.02 KB
/
upload_devbuilds.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env ruby
# frozen_string_literal: true
# This scripts uploads devbuilds that were written to 'builds' folder by make_release script
require 'optparse'
require 'sha3'
require_relative 'bootstrap_rubysetupsystem'
require_relative 'RubySetupSystem/RubyCommon'
require_relative 'scripts/uploader'
require_relative 'scripts/dehydrate'
@options = {
parallel_upload: DEFAULT_PARALLEL_UPLOADS,
url: DEVCENTER_URL,
retries: 3
}
OptionParser.new do |opts|
opts.banner = "Usage: #{$PROGRAM_NAME} [options]"
opts.on('-r', '--retries count', Integer,
'How many upload export retries to do to avoid spurious failures') do |r|
@options[:retries] = r
end
opts.on('--url devcenterurl', 'Custom URL to upload to') do |url|
@options[:url] = url
end
opts.on('-j', '--parallel count', 'How many parallel uploads to do') do |p|
@options[:parallel_upload] = p
end
end.parse!
onError "Unhandled parameters: #{ARGV}" unless ARGV.empty?
DevBuildUploader.new(DEVBUILDS_FOLDER, DEHYDRATE_CACHE, @options).run