Skip to content

Commit 0b6fb58

Browse files
committed
use downloaded sha256
1 parent c6b7275 commit 0b6fb58

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

vendors/Rakefile

+16-3
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,22 @@ EXAMPLES = '3.2'
1515
HOME_DIR = ENV['HOME']
1616
MAC_OR_LINUX = /linux|mac|darwin/ =~ RbConfig::CONFIG['host_os']
1717

18-
CLOBBER.include("jruby-complete-#{JRUBYC_VERSION}.jar")
18+
CLOBBER << "jruby-complete-#{JRUBYC_VERSION}.jar"
19+
CLOBBER << "jruby-complete-#{JRUBYC_VERSION}.jar.sha256"
20+
21+
file "jruby-complete-#{JRUBYC_VERSION}.jar.sha256" do
22+
begin
23+
sh "wget https://repo1.maven.org/maven2/org/jruby/jruby-complete/#{JRUBYC_VERSION}/jruby-complete-#{JRUBYC_VERSION}.jar.sha256"
24+
rescue
25+
warn(WARNING)
26+
end
27+
end
28+
29+
desc "get sha256"
30+
task :get_sha256 => ["jruby-complete-#{JRUBYC_VERSION}.jar.sha256"]
1931

2032
desc "download, and copy to jruby_art"
21-
task :default => [:download, :copy_ruby]
33+
task :default => [:get_sha256, :download, :copy_ruby]
2234

2335
desc "download JRuby upstream sources"
2436
task :download => ["jruby-complete-#{JRUBYC_VERSION}.jar"]
@@ -29,7 +41,8 @@ file "jruby-complete-#{JRUBYC_VERSION}.jar" do
2941
rescue
3042
warn(WARNING)
3143
end
32-
check_sha256("jruby-complete-#{JRUBYC_VERSION}.jar", "32791137441c76bb68188ffe35548d8a6b609c73833013e20fcb8d8de7700d16")
44+
value=File.read("jruby-complete-#{JRUBYC_VERSION}.jar.sha256")
45+
check_sha256("jruby-complete-#{JRUBYC_VERSION}.jar", value)
3346
end
3447

3548
directory "../lib/ruby"

0 commit comments

Comments
 (0)