lib/orientepodspecpush.rb in orientepodspecpush-0.1.1 vs lib/orientepodspecpush.rb in orientepodspecpush-0.1.2
- old
+ new
@@ -19,19 +19,22 @@
puts "No spec file found".red unless podspecFile != nil
exit unless podspecFile != nil
end
def package
+ puts "start package".green
cmd = []
cmd << ['bundle exec'] if shouldUseBundleExec
podPackage = "pod package #{specfile}"
- if opts[:package] != nil
- podPackage + opts[:package]
+ unless opts[:package] == nil
+ podPackage + opts[:package].to_s
end
cmd << [podPackage]
system cmd.join(' ')
+
+ puts "finish package".green
# system "git add ."
# system "git commit -m 'upload framework'"
# system "git push origin master"
end
@@ -50,12 +53,12 @@
def makeLintCmd(opts)
lintCmd = []
lintCmd << ['bundle exec'] if shouldUseBundleExec
podSpecLint = "pod spec lint"
- if opts[:lint] != nil
- podSpecLint + opts[:lint]
+ unless opts[:lint] == nil
+ podSpecLint + opts[:lint].to_s
end
lintCmd << [podSpecLint]
@@ -76,12 +79,12 @@
def makePushCmd(opts)
cmd = []
cmd << ['bundle exec'] if shouldUseBundleExec
podRepoPush = "pod repo push #{opts[:specRepo]} #{specfile}"
- if opts[:push] != nil
- podRepoPush + opts[:push]
+ unless opts[:push] == nil
+ podRepoPush + opts[:push].to_s
end
cmd << [podRepoPush]
cmd.join(' ')
end
@@ -139,10 +142,10 @@
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
- if opts[:noPackage] == false
+ unless opts[:noPackage] == true
package
end
end
end