Rakefile in u3d-1.0.4 vs Rakefile in u3d-1.0.5
- old
+ new
@@ -100,10 +100,11 @@
raise "Missing pr_branch argument" unless pr_branch
UI.user_error! "Prepare git PR stopped by user" unless UI.confirm("Creating PR branch #{pr_branch}")
run_command("git checkout -b #{pr_branch}")
end
+desc 'Prepare a release: check repo status, generate changelog, create PR'
task pre_release: 'ensure_git_clean' do
require 'u3d/version'
nextversion = U3d::VERSION
# check not already released
@@ -130,10 +131,11 @@
sh "hub pull-request -m '#{msg}'" # requires hub pre-release " -l nochangelog"
sh 'git checkout master'
sh "git branch -D #{pr_branch}"
end
+desc 'Bump the version number to the version entered interactively; pushes a commit to master'
task bump: 'ensure_git_clean' do
nextversion = UI.input "Next version will be:"
UI.user_error! "Bump version stopped by user" unless UI.confirm("Next version will be #{nextversion}. Confirm?")
U3dCode.version = nextversion
GithubChangelogGenerator.future_release = nextversion
@@ -141,14 +143,16 @@
sh 'git add .github_changelog_generator lib/u3d/version.rb Gemfile.lock'
sh "git commit -m 'Bump version to #{nextversion}'"
sh 'git push'
end
+desc 'Update the changelog, no commit made'
task :changelog do
puts "Updating changelog #{ENV['CHANGELOG_GITHUB_TOKEN']}"
sh "github_changelog_generator" if ENV['CHANGELOG_GITHUB_TOKEN']
end
+desc 'Run all rspec tests'
task :test_all do
formatter = "--format progress"
if ENV["CIRCLECI"]
Dir.mkdir("/tmp/rspec/")
formatter += " -r rspec_junit_formatter --format RspecJunitFormatter -o /tmp/rspec/rspec.xml"