lib/orientepodspecpush.rb in orientepodspecpush-0.3.3 vs lib/orientepodspecpush.rb in orientepodspecpush-0.3.4
- old
+ new
@@ -186,10 +186,11 @@
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]}"
@@ -197,9 +198,13 @@
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