Skip to content

Commit

Permalink
Added a --local-only option to pod push so that developers can push l…
Browse files Browse the repository at this point in the history
…ocally and test before pushing to a remote.
  • Loading branch information
dlvenable committed Jul 16, 2012
1 parent 0920c42 commit 3c7ff4e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/cocoapods/command/push.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@ def self.banner
end

def self.options
[["--allow-warnings", "Allows to push if warnings are not evitable"]].concat(super)
[ ["--allow-warnings", "Allows to push if warnings are not evitable"],
["--local-only", "Does not perform the step of pushing REPO to its remote"] ].concat(super)
end

extend Executable
executable :git

def initialize(argv)
@allow_warnings = argv.option('--allow-warnings')
@local_only = argv.option('--local-only')
@repo = argv.shift_argument
@podspec = argv.shift_argument
super unless argv.empty? && @repo
Expand All @@ -32,7 +34,7 @@ def run
check_repo_status
update_repo
add_specs_to_repo
push_repo
push_repo unless @local_only
puts
end

Expand Down

0 comments on commit 3c7ff4e

Please sign in to comment.