lib/orientepodspecpush.rb in orientepodspecpush-0.0.6 vs lib/orientepodspecpush.rb in orientepodspecpush-0.0.7

- old
+ new

@@ -83,25 +83,27 @@ @podVersionMessage = gets.chomp.downcase # system "git add ." # system "git commit -m 'upload framework'" # -# system "git tag -a #{@podVersion} -m '#{@podVersionMessage}'" -# system "git push --tags" + 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)) - cmd = [] - cmd << ['bundle exec'] if shouldUseBundleExec - cmd << ["pod package #{specfile} --force"] +# cmd = [] +# cmd << ['bundle exec'] if shouldUseBundleExec +# cmd << ["pod package #{specfile} --force"] +# +# system cmd.join(' ') +# system "git add ." +# system "git commit -m 'upload framework'" +# system "git push origin master" + - system cmd.join(' ') - system "git add ." - system "git commit -m 'upload framework'" - system "git tag -a #{@podVersion} -m '#{@podVersionMessage}'" system "git push --tags" end def rollbackTag @@ -125,10 +127,19 @@ puts "Linting failed, try again by allowing warnings? [Y/n]".blue gets.chomp.downcase == "y" ? executeLint(true) : rollbackTag elsif success == false && withWarnings == true puts "Even with warnings, something is wrong. Look for any errors".red rollbackTag + else + cmd = [] + cmd << ['bundle exec'] if shouldUseBundleExec + cmd << ["pod package #{specfile} --force"] + + system cmd.join(' ') + system "git add ." + system "git commit -m 'upload framework'" + system "git push origin master" end end def executePush puts "Executing: #{@pushCmd}".green @@ -170,10 +181,10 @@ # Cmds @lintCmd = makeLintCmd(opts) @pushCmd = makePushCmd(opts) # execute - executeLint(false) + x(false) executePush # Tidy up this repo!! commitThisRepo end