lib/orientepodspecpush.rb in orientepodspecpush-0.3.4 vs lib/orientepodspecpush.rb in orientepodspecpush-0.3.5
- old
+ new
@@ -176,21 +176,21 @@
puts "Could not push to server, consider finishing by hand by performing a git push. Your spec repo should be up to date".red unless system('git push origin master')
end
def push
opts = Trollop::options do
+ version "9.9.9"
opt :specRepo, "Name of the repo to push to. See pod repo list for available repos", :type => :string
opt :workspace, "Path to cocoapod workspace", :type => :string
opt :sources, "Comma delimited list of private repo sources to consider when linting private repo. Master is included by default so private repos can source master", :type => :string
opt :private, "If set, assume the cocoapod is private and skip public checks"
opt :tag, "tag of the repo push to", :type => :string
opt :tagCommitMsg, "commit message of this tag", :type => :string
opt :lint, "pod spec lint 情况下所需要的参数,需要用引号括起来,例如'--allow-warnings --sources=some source address'",:type => :string
opt :package, "pod package 情况下所需要的参数,需要用引号括起来,例如'--force --no-mangle'",:type => :string
opt :push, "pod repo push 情况下所需要的参数,需要用引号括起来,例如'--verbose --use-libraries'",:type => :string
opt :noPackage, "If set, no need to package"
- opt :version, "show the version number of this package", :type => :string
end
puts "lint:#{opts[:lint]}"
puts "package:#{opts[:package]}"
puts "push:#{opts[:push]}"
@@ -198,13 +198,9 @@
puts "tag:#{opts[:tag]}"
# Need these two
Trollop::die :specRepo, "Spec Repo must be provided" if opts[:specRepo] == nil
Trollop::die :workspace, "Workspace path must be provided" if opts[:workspace] == nil
Trollop::die :tag, "tag must be provided" if opts[:tag] == nil
- if opts[:version] != nil
- puts Orientepodspecpush::VERSION
- exit
- end
Dir.chdir(opts[:workspace]) do
# Check
ensureGitClean
ensureSpecfile