summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorNeil Lathwood <neil@lathwood.co.uk>2018-04-27 10:51:39 +0100
committerNeil Lathwood <neil@lathwood.co.uk>2018-04-27 10:51:39 +0100
commit6574f129bca9633d728c178b12e49a2e9be89cdd (patch)
treea2d630fca3156658aea07469b9a5c3fdf00f6846 /Rakefile
parentd96cfac1f09ff4055f54ab604358290865d41f62 (diff)
parent34fd5369feee94ab45c5a81d7769b1df717e4c8c (diff)
Rebased from master
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
index de6ba82..25948a2 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,9 +1,22 @@
require 'bundler/gem_tasks'
require 'rake/testtask'
+require_relative 'lib/oxidized/version'
gemspec = eval(File.read(Dir['*.gemspec'].first))
file = [gemspec.name, gemspec.version].join('-') + '.gem'
+# Integrate Rubocop if available
+begin
+ require 'rubocop/rake_task'
+
+ RuboCop::RakeTask.new
+ task(:default).prerequisites << task(:rubocop)
+rescue LoadError
+ task :rubocop do
+ puts 'Install rubocop to run its rake tasks'
+ end
+end
+
desc 'Validate gemspec'
task :gemspec do
gemspec.validate
@@ -19,6 +32,12 @@ task :test do
end
end
+task :build => :version_set
+task :version_set do
+ Oxidized.version_set
+ Bundler::GemHelper.instance.gemspec.version = Oxidized::VERSION
+end
+
## desc 'Install gem'
## task :install => :build do
## system "sudo -Es sh -c \'umask 022; gem install gems/#{file}\'"