File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,10 @@ NPM_PACKAGES = [
41
41
ruby_version : "3.2" ,
42
42
gemfile : "packages/npm-packages/ruby-wasm-wasi/Gemfile" ,
43
43
target : "wasm32-unknown-wasi"
44
+ } ,
45
+ {
46
+ name : "ruby-wasm-wasi" ,
47
+ target : "wasm32-unknown-wasi"
44
48
}
45
49
]
46
50
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ tools = {
6
6
}
7
7
8
8
def npm_pkg_build_command ( pkg )
9
+ # Skip if the package does not require building ruby
10
+ return nil unless pkg [ :ruby_version ] && pkg [ :target ]
9
11
[
10
12
"bundle" ,
11
13
"exec" ,
22
24
23
25
def npm_pkg_rubies_cache_key ( pkg )
24
26
build_command = npm_pkg_build_command ( pkg )
27
+ return nil unless build_command
25
28
require "open3"
26
29
cmd = build_command + [ "--print-ruby-cache-key" ]
27
30
stdout , status = Open3 . capture2 ( *cmd )
@@ -38,10 +41,13 @@ namespace :npm do
38
41
pkg_dir = "#{ Dir . pwd } /packages/npm-packages/#{ pkg [ :name ] } "
39
42
40
43
namespace pkg [ :name ] do
41
- build_command = npm_pkg_build_command ( pkg )
42
44
43
45
desc "Build ruby for npm package #{ pkg [ :name ] } "
44
46
task "ruby" do
47
+ build_command = npm_pkg_build_command ( pkg )
48
+ # Skip if the package does not require building ruby
49
+ next unless build_command
50
+
45
51
env = {
46
52
# Share ./build and ./rubies in the same workspace
47
53
"RUBY_WASM_ROOT" => base_dir
You can’t perform that action at this time.
0 commit comments