File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ require "open-uri"
5
5
$LOAD_PATH << File . join ( File . dirname ( __FILE__ ) , "lib" )
6
6
7
7
require "ruby_wasm/rake_task"
8
+ require "ruby_wasm/packager"
8
9
9
10
Dir . glob ( "tasks/**.rake" ) . each { |f | import f }
10
11
@@ -54,7 +55,8 @@ LIB_ROOT = File.dirname(__FILE__)
54
55
55
56
TOOLCHAINS = { }
56
57
BUILDS . map { |_ , target , _ | target } . uniq . each do |target |
57
- toolchain = RubyWasm ::Toolchain . get ( target )
58
+ build_dir = File . join ( LIB_ROOT , "build" )
59
+ toolchain = RubyWasm ::Toolchain . get ( target , build_dir )
58
60
TOOLCHAINS [ toolchain . name ] = toolchain
59
61
end
60
62
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ def root
76
76
end
77
77
78
78
# Retrieves the alias definitions for the Ruby sources.
79
- def build_source_aliases
79
+ def self . build_source_aliases ( root )
80
80
patches = Dir [ File . join ( root , "patches" , "*.patch" ) ]
81
81
sources = {
82
82
"head" => {
@@ -139,7 +139,7 @@ def full_build_options
139
139
options [ :src ]
140
140
else
141
141
src_name = options [ :src ]
142
- aliases = build_source_aliases
142
+ aliases = self . class . build_source_aliases ( root )
143
143
aliases [ src_name ] || raise ( "Unknown Ruby source: #{ src_name } (available: #{ aliases . keys . join ( ", " ) } )" )
144
144
end
145
145
options . merge (
Original file line number Diff line number Diff line change 1
1
def latest_build_sources
2
2
BUILD_SOURCES
3
- . filter_map do |name , src |
3
+ . filter_map do |name |
4
+ src = RubyWasm ::Packager . build_source_aliases ( LIB_ROOT ) [ name ]
4
5
case src [ :type ]
5
6
when "github"
6
7
url = "repos/#{ src [ :repo ] } /commits/#{ src [ :rev ] } "
@@ -21,7 +22,8 @@ def release_note
21
22
|:-------:|:------:|
22
23
EOS
23
24
24
- BUILD_SOURCES . each do |name , source |
25
+ BUILD_SOURCES . each do |name |
26
+ source = RubyWasm ::Packager . build_source_aliases ( LIB_ROOT ) [ name ]
25
27
case source [ :type ]
26
28
when "github"
27
29
output +=
You can’t perform that action at this time.
0 commit comments