lib/orientepodspecpush.rb in orientepodspecpush-0.2.4 vs lib/orientepodspecpush.rb in orientepodspecpush-0.2.5

- old
+ new

@@ -99,13 +99,13 @@ # system "git add ." # system "git commit -m 'upload framework'" # if opts[:versionCommitMsg] == nil - system "git tag -a #{opts[:version]} -m 'add new tag'" + system "git tag -a #{opts[:tag]} -m 'add new tag'" else - system "git tag -a #{opts[:version]} -m '#{opts[:versionCommitMsg]}'" + system "git tag -a #{opts[:version]} -m '#{opts[:tagCommitMsg]}'" end # system "git tag -a #{@podVersion} -m '#{@podVersionMessage}'" system "git push --tags" contents = File.read(specfile) @@ -180,26 +180,26 @@ opts = Trollop::options do 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 :version, "version of the repo push to", :type => :string - opt :versionCommitMsg, "commit message of this version", :type => :string + 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" end puts "lint:#{opts[:lint]}" puts "package:#{opts[:package]}" puts "push:#{opts[:push]}" puts "noPackage:#{opts[:noPackage]}" - puts "version:#{opts[:version]}" + 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 :version, "version must be provided" if opts[:version] == nil + Trollop::die :tag, "tag must be provided" if opts[:tag] == nil Dir.chdir(opts[:workspace]) do # Check ensureGitClean ensureSpecfile