-
Notifications
You must be signed in to change notification settings - Fork 13
/
Rakefile
executable file
·36 lines (28 loc) · 1.09 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
require 'fileutils'
require 'rspec'
require 'rspec/core/rake_task'
require 'rake/clean'
require './lib/scorched/version'
CLEAN.include "pkg"
task :default => :spec
task :test => :spec
RSpec::Core::RakeTask.new(:spec)
desc 'Releases a new version of Scorched.'
task :release => [:prerelease, :spec, :'gem:install', :commit_version, :'gem:release', :clean]
desc 'Commits and tags git repository as new version, pushing up to github'
task :commit_version do
sh "git commit --allow-empty -a -m 'v#{Scorched::VERSION} release.' &&
git tag -a #{Scorched::VERSION} -m 'v#{Scorched::VERSION} release.' &&
git push &&
git push --tags"
end
desc 'Displays a pre-release message, requiring user input'
task :prerelease do
puts <<-MSG
About to release Scorched v#{Scorched::VERSION}. Please ensure CHANGES log is up-to-date, all relevant documentation is updated, changes on Github master repository have been pulled and merged, and that any new files not under version control have been added/staged. Press any key to continue...
MSG
STDIN.gets
end
namespace :gem do
require "bundler/gem_tasks"
end