Sha256: 381e4c0b14885231f3a3398cb968c318b52669432f543f82870fe2cebb9ec50b
Contents?: true
Size: 987 Bytes
Versions: 1
Compression:
Stored size: 987 Bytes
Contents
module Fastlane module Actions # Adds a git tag to the current commit class PushToGitRemoteAction def self.run(params) options = params.first remote = (options && options[:remote]) || 'origin' force = (options && options[:force]) || false local_branch = (options && (options[:local_branch] || options[:branch])) || Actions.git_branch.gsub(/#{remote}\//, '') || 'master' remote_branch = (options && options[:remote_branch]) || local_branch # construct our command as an array of components command = [ 'git', 'push', remote, "#{local_branch}:#{remote_branch}", '--tags' ] # optionally add the force component command << '--force' if force # execute our command puts Actions.sh('pwd') Actions.sh(command.join(' ')) Helper.log.info 'Sucesfully pushed to remote.' end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fastlane-0.6.1 | lib/fastlane/actions/push_to_git_remote.rb |