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 = [
4141 ruby_version : "3.2" ,
4242 gemfile : "packages/npm-packages/ruby-wasm-wasi/Gemfile" ,
4343 target : "wasm32-unknown-wasi"
44+ } ,
45+ {
46+ name : "ruby-wasm-wasi" ,
47+ target : "wasm32-unknown-wasi"
4448 }
4549]
4650
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ tools = {
66}
77
88def npm_pkg_build_command ( pkg )
9+ # Skip if the package does not require building ruby
10+ return nil unless pkg [ :ruby_version ] && pkg [ :target ]
911 [
1012 "bundle" ,
1113 "exec" ,
2224
2325def npm_pkg_rubies_cache_key ( pkg )
2426 build_command = npm_pkg_build_command ( pkg )
27+ return nil unless build_command
2528 require "open3"
2629 cmd = build_command + [ "--print-ruby-cache-key" ]
2730 stdout , status = Open3 . capture2 ( *cmd )
@@ -38,10 +41,13 @@ namespace :npm do
3841 pkg_dir = "#{ Dir . pwd } /packages/npm-packages/#{ pkg [ :name ] } "
3942
4043 namespace pkg [ :name ] do
41- build_command = npm_pkg_build_command ( pkg )
4244
4345 desc "Build ruby for npm package #{ pkg [ :name ] } "
4446 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+
4551 env = {
4652 # Share ./build and ./rubies in the same workspace
4753 "RUBY_WASM_ROOT" => base_dir
You can’t perform that action at this time.
0 commit comments