Skip to content

Commit

Permalink
[Rakefile] Update release task now that develop is gone.
Browse files Browse the repository at this point in the history
  • Loading branch information
alloy committed Jul 9, 2012
1 parent 7149df1 commit 3f36305
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions Rakefile
Expand Up @@ -79,8 +79,8 @@ namespace :gem do
task :release do

unless ENV['SKIP_CHECKS']
if `git symbolic-ref HEAD 2>/dev/null`.strip.split('/').last != 'develop'
$stderr.puts "[!] You need to be on the `develop' branch in order to be able to do a release."
if `git symbolic-ref HEAD 2>/dev/null`.strip.split('/').last != 'master'
$stderr.puts "[!] You need to be on the `master' branch in order to be able to do a release."
exit 1
end

Expand Down Expand Up @@ -120,6 +120,9 @@ namespace :gem do
exit 1
end

# Ensure that the branches are up to date with the remote
sh "git pull"

puts "* Running specs"
silent_sh('rake spec:all')

Expand All @@ -138,19 +141,11 @@ namespace :gem do
# ENV['FROM_GEM'] = '1'
# silent_sh "rake examples:build"

# Ensure that the branches are up to date with the remote
sh "git pull"

# Then release
sh "git commit lib/cocoapods.rb -m 'Release #{gem_version}'"
sh "git push origin develop"
sh "git checkout master"
sh "git pull"
sh "git merge develop -m 'Release #{gem_version}'"
sh "git tag -a #{gem_version} -m 'Release #{gem_version}'"
sh "git push origin master"
sh "git push origin --tags"
sh "git checkout develop"
sh "gem push #{gem_filename}"

# Update the last version in CocoaPods-version.yml
Expand Down

0 comments on commit 3f36305

Please sign in to comment.