File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -13,17 +13,7 @@ rescue LoadError
13
13
end
14
14
end
15
15
16
- file './lib/jruby-launcher.rb' => 'version.h' do |t |
17
- version = nil
18
- IO . readlines ( t . prerequisites . first ) . grep ( /LAUNCHER_VERSION\s +"([^"]+)"/ ) { |l | version = $1 }
19
- ruby = IO . readlines ( t . name )
20
- File . open ( t . name , "wb" ) do |f |
21
- ruby . each do |l |
22
- f << l . sub ( /VERSION\s *=\s *"([^"]*)"/ , "VERSION = \" #{ version } \" " )
23
- end
24
- end
25
- end
26
-
16
+ desc "Generate gemspec file"
27
17
task :gemspec => './lib/jruby-launcher.rb' do
28
18
@gemspec ||= Gem ::Specification . new do |s |
29
19
load './lib/jruby-launcher.rb'
@@ -42,12 +32,14 @@ task :gemspec => './lib/jruby-launcher.rb' do
42
32
end
43
33
end
44
34
35
+ desc "Create gem file"
45
36
task :package => [ :update_version , :gemspec ] do
46
37
Gem ::PackageTask . new ( @gemspec ) do |pkg |
47
38
end
48
39
Rake ::Task [ 'gem' ] . invoke
49
40
end
50
41
42
+ desc "Update version.h based on information in lib/jruby-launcher.rb"
51
43
task :update_version do
52
44
load File . join ( File . dirname ( __FILE__ ) , "lib" , "jruby-launcher.rb" )
53
45
version_file = File . join ( File . dirname ( __FILE__ ) , "version.h" )
You can’t perform that action at this time.
0 commit comments