mirror of
https://github.com/rubyjs/libv8
synced 2023-03-27 23:21:48 -04:00
Do versioning on checkout
This commit is contained in:
parent
34ea14e7b2
commit
0893149492
3 changed files with 4 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -6,3 +6,4 @@ Gemfile.lock
|
|||
pkg/*
|
||||
tmp/*
|
||||
lib/libv8/build/*
|
||||
lib/libv8/VERSION
|
||||
|
|
1
Rakefile
1
Rakefile
|
@ -46,6 +46,7 @@ task :checkout, :version do |t, options|
|
|||
fail "Version #{options.version} does not exist! Aborting..." if !versions.member?(Gem::Version.new(options.version))
|
||||
puts "Checking out version #{options.version}"
|
||||
`git checkout -f tags/#{options.version}`
|
||||
File.open(File.join(File.dirname(__FILE__), 'lib', 'libv8', 'VERSION'), 'w') { |f| f.write options.version.to_s }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
module Libv8
|
||||
V8_VERSION = Dir.chdir(File.join(File.dirname(__FILE__), 'v8')) { `git tag`.split.sort.last }
|
||||
version_file = File.join(File.dirname(__FILE__), 'VERSION')
|
||||
V8_VERSION = File.exist?(version_file) ? File.read(version_file).chomp : "0.0"
|
||||
REVISION = ""
|
||||
VERSION = V8_VERSION + REVISION
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue