Method: DeployGate::Commands::Deploy::Push.upload
- Defined in:
- lib/deploygate/commands/deploy/push.rb
.upload(args, options) ⇒ void
This method returns an undefined value.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/deploygate/commands/deploy/push.rb', line 13 def upload(args, ) session = DeployGate::Session.new() unless session.login? Login.start_login_or_create_account() session = DeployGate::Session.new() end = . owner = .user || session.name distribution_key = .distribution_key open = .open disable_notify = .disable_notify command = .command || COMMAND file_path = args.first data = nil print I18n.t('commands.deploy.push.upload.loading', owner: owner) begin data = DeployGate::Deploy.push(command, file_path, owner, , distribution_key, disable_notify) { print '.' sleep 0.2 } rescue => e upload_error(e) end upload_success(data, open) end |