File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed
Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -15,10 +15,22 @@ EXAMPLES = '3.2'
1515HOME_DIR = ENV [ 'HOME' ]
1616MAC_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
2032desc "download, and copy to jruby_art"
21- task :default => [ :download , :copy_ruby ]
33+ task :default => [ :get_sha256 , : download, :copy_ruby ]
2234
2335desc "download JRuby upstream sources"
2436task :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 )
3346end
3447
3548directory "../lib/ruby"
You can’t perform that action at this time.
0 commit comments