Commit 13b9b3c7 authored by Fabio Pelosin's avatar Fabio Pelosin

[Command::Push] Disable pushing to the master repo

https://github.com/CocoaPods/CocoaPods/issues/2151\#issuecomment-43493702\
parent b241c56f
...@@ -34,7 +34,7 @@ GIT ...@@ -34,7 +34,7 @@ GIT
GIT GIT
remote: https://github.com/CocoaPods/cocoapods-plugins.git remote: https://github.com/CocoaPods/cocoapods-plugins.git
revision: ce2d30ff9bd4570708e51a2bdac4d8de60fe9bfc revision: 413e7ba6c956f798af05db4aa66941c010a1517b
branch: master branch: master
specs: specs:
cocoapods-plugins (0.1.1) cocoapods-plugins (0.1.1)
...@@ -42,7 +42,7 @@ GIT ...@@ -42,7 +42,7 @@ GIT
GIT GIT
remote: https://github.com/CocoaPods/cocoapods-trunk.git remote: https://github.com/CocoaPods/cocoapods-trunk.git
revision: 4dcaed7fc44e5f552985379fece9620d2bf88a53 revision: d53eebda39d05bd08fdba5bb2c568b535d3cec4e
branch: master branch: master
specs: specs:
cocoapods-trunk (0.0.1) cocoapods-trunk (0.0.1)
...@@ -52,7 +52,7 @@ GIT ...@@ -52,7 +52,7 @@ GIT
GIT GIT
remote: https://github.com/CocoaPods/cocoapods-try.git remote: https://github.com/CocoaPods/cocoapods-try.git
revision: 87294fd83feda93ec242270c452ce8f025429778 revision: bd65e634ffe50e37b549ce0a386ff0628289c7ed
branch: master branch: master
specs: specs:
cocoapods-try (0.2.0) cocoapods-try (0.2.0)
......
...@@ -27,20 +27,16 @@ module Pod ...@@ -27,20 +27,16 @@ module Pod
@allow_warnings = argv.flag?('allow-warnings') @allow_warnings = argv.flag?('allow-warnings')
@local_only = argv.flag?('local-only') @local_only = argv.flag?('local-only')
@repo = argv.shift_argument @repo = argv.shift_argument
if @repo.nil?
@repo = "master"
elsif @repo.end_with? ".podspec"
@podspec = @repo
@repo = "master"
else
@podspec = argv.shift_argument @podspec = argv.shift_argument
end
super super
end end
def validate! def validate!
super super
help! "A spec-repo name is required." unless @repo help! "A spec-repo name is required." unless @repo
if @repo == 'master'
help! "To push to the master repo use the `pod trunk push` command"
end
end end
def run def run
......
Subproject commit 801c5e9bb1d9f2ca11ebba09013c7c8a4329d780 Subproject commit 0bf04d4f4cc3f544f13e27a85227e0a75862a871
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment