Skip to content

Commit 26dbdd2

Browse files
committed
Add task description, and remove the "other" version.h rake task
1 parent 625d895 commit 26dbdd2

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

Rakefile

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,7 @@ rescue LoadError
1313
end
1414
end
1515

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"
2717
task :gemspec => './lib/jruby-launcher.rb' do
2818
@gemspec ||= Gem::Specification.new do |s|
2919
load './lib/jruby-launcher.rb'
@@ -42,12 +32,14 @@ task :gemspec => './lib/jruby-launcher.rb' do
4232
end
4333
end
4434

35+
desc "Create gem file"
4536
task :package => [:update_version, :gemspec] do
4637
Gem::PackageTask.new(@gemspec) do |pkg|
4738
end
4839
Rake::Task['gem'].invoke
4940
end
5041

42+
desc "Update version.h based on information in lib/jruby-launcher.rb"
5143
task :update_version do
5244
load File.join(File.dirname(__FILE__), "lib", "jruby-launcher.rb")
5345
version_file = File.join(File.dirname(__FILE__), "version.h")

0 commit comments

Comments
 (0)