lib/orientepodspecpush.rb in orientepodspecpush-0.0.4 vs lib/orientepodspecpush.rb in orientepodspecpush-0.0.5
- old
+ new
@@ -25,10 +25,18 @@
cmd << ['bundle exec'] if shouldUseBundleExec
cmd << ["pod package #{specfile} --force"]
system cmd.join(' ')
end
+
+ def packageCodePush
+ cmd = []
+ cmd << ['bundle exec'] if shouldUseBundleExec
+ cmd << ["pod package #{specfile} --force"]
+
+ system cmd.join(' ')
+ end
def ensureGitClean
if `git status --porcelain`.length != 0
puts "Repo is not clean; will not push new version".red
exit
@@ -72,15 +80,23 @@
@podVersion = gets.chomp.downcase
puts "Please enter new a brief message to put in the git tag describing what's changed".blue
@podVersionMessage = gets.chomp.downcase
- system "git tag -a #{@podVersion} -m '#{@podVersionMessage}'"
- system "git push --tags"
+# system "git add ."
+# system "git commit -m 'upload framework'"
+#
+# system "git tag -a #{@podVersion} -m '#{@podVersionMessage}'"
+# system "git push --tags"
contents = File.read(specfile)
oldVersion = Regexp.new('[0-9.]{2,6}').match(Regexp.new('(s.version)\s*=.*\n').match(contents).to_s).to_s
File.write(specfile, contents.sub!(oldVersion, @podVersion))
+ system "git add ."
+ system "git commit -m 'upload framework'"
+
+ system "git tag -a #{@podVersion} -m '#{@podVersionMessage}'"
+ system "git push --tags"
end
def rollbackTag
puts "Rolling back git tags".green
system "git tag -d #{@podVersion}"