summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaku Ytti <saku@ytti.fi>2018-04-25 21:14:40 +0300
committerSaku Ytti <saku@ytti.fi>2018-04-25 21:14:40 +0300
commit9b22dfeebd5d5f30a8e15be28a00ff84534e9998 (patch)
treefbd432a95fbca4f5100c8f7333fa5bf6240be07f
parent96910082ed914ee51f33eaea44dd34f8bf5d11e6 (diff)
only set version when building packege
-rw-r--r--Rakefile7
-rw-r--r--lib/oxidized/version.rb2
-rw-r--r--oxidized.gemspec1
3 files changed, 8 insertions, 2 deletions
diff --git a/Rakefile b/Rakefile
index 6f792d5..25948a2 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,5 +1,6 @@
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'
@@ -31,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}\'"
diff --git a/lib/oxidized/version.rb b/lib/oxidized/version.rb
index 0d90e34..de99d5f 100644
--- a/lib/oxidized/version.rb
+++ b/lib/oxidized/version.rb
@@ -1,6 +1,6 @@
module Oxidized
VERSION = '0.21.0'
- VERSION_FULL = '0.21.0-175-gcc22060'
+ VERSION_FULL = '0.21.0-180-g9691008'
def self.version_set
Oxidized.send(:remove_const, :VERSION_FULL)
const_set(:VERSION_FULL, %x(git describe --tags).chop)
diff --git a/oxidized.gemspec b/oxidized.gemspec
index bf90d00..8a126bb 100644
--- a/oxidized.gemspec
+++ b/oxidized.gemspec
@@ -1,7 +1,6 @@
lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'oxidized/version'
-Oxidized.version_set
Gem::Specification.new do |s|
s.name = 'oxidized'