Skip to content

Instantly share code, notes, and snippets.

@alloy
Created January 22, 2013 11:02
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save alloy/4593824 to your computer and use it in GitHub Desktop.
Save alloy/4593824 to your computer and use it in GitHub Desktop.
desc "Create a new version tag and push a new podspec"
task :release do
require 'cocoapods'
require 'colored'
version = Pod::Specification.from_file(Pathname.pwd + 'MyLib.podspec').version
puts "Releasing version `#{version}'. Is that correct? (y/n)"
if $stdin.gets.strip.downcase == 'y'
sh "git tag -a #{version} -m 'Release #{version}'"
sh "git push --tags"
sh "pod lint"
sh "pod push master"
else
puts "Aborting..."
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment