Method: Menu::Release#upload_payload
- Defined in:
- lib/menu/release.rb
#upload_payload ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/menu/release.rb', line 11 def upload_payload s3 = Aws::S3::Client.new(region: 'us-east-1') key = "#{options.component}/v#{self.version}-#{@md5}#{File.extname(@payload_file)}" puts "Uploading payload (#{key}) to S3..." if .verbose s3.put_object( acl: "public-read", body: File.open(@payload_file), bucket: .bucket, key: key ) puts "Upload complete." if .verbose self.payload = ENV['MENU_SSL_URL'] + '/' + key end |