version:minor_release and version:major_release: add checks for unclean staging env

This commit is contained in:
cowboycoded 2011-02-04 11:11:44 -05:00
parent 8fcaf4c440
commit 91efd4c67e
1 changed files with 14 additions and 6 deletions

View File

@ -64,16 +64,24 @@ namespace :version do
desc "create a new version, create tag and push to github" desc "create a new version, create tag and push to github"
task :minor_release do task :minor_release do
Rake::Task['version:bump:minor'].invoke if Jeweler::Commands::ReleaseToGit.new.clean_staging_area?
Rake::Task['gemspec:release'].invoke Rake::Task['version:bump:minor'].invoke
Rake::Task['git:release'].invoke Rake::Task['gemspec:release'].invoke
Rake::Task['git:release'].invoke
else
puts "Commit your changed files first"
end
end end
desc "create a new version, create tag and push to github" desc "create a new version, create tag and push to github"
task :major_release do task :major_release do
Rake::Task['version:bump:major'].invoke if Jeweler::Commands::ReleaseToGit.new.clean_staging_area?
Rake::Task['gemspec:release'].invoke Rake::Task['version:bump:major'].invoke
Rake::Task['git:release'].invoke Rake::Task['gemspec:release'].invoke
Rake::Task['git:release'].invoke
else
puts "Commit your changed files first"
end
end end
end end