Skip to content

Commit

Permalink
Make sure build-default also creates a spacewalk.js
Browse files Browse the repository at this point in the history
  • Loading branch information
noahgibbs committed Jul 20, 2024
1 parent c1d6a6c commit 12a42c3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion exe/space_shoes
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@ when "build-default"
include SpaceShoes::Packaging

location = build_default_wasm_package
puts "Built default Ruby Wasm package to #{location.inspect}"
sp_location = File.join(SpaceShoes::Packaging::PACKAGING_ROOT, "spacewalk.js")
sp_location = write_spacewalk_file(out_file: sp_location)

puts "Built default Ruby Wasm package to #{location}"
puts "Copied spacewalk.js to #{sp_location}"
when "src-package"
include SpaceShoes::Packaging

Expand Down
1 change: 1 addition & 0 deletions packaging/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ build
rubies
ruby.wasm
packed_ruby.wasm
spacewalk.js
2 changes: 2 additions & 0 deletions test/test_space_shoes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ class TestSpaceShoesBuild < SpaceShoesCLITest
def test_space_shoes_build_ruby_default
Dir.chdir(ROOT_DIR) do
out_or_fail "exe/space-shoes --dev build-default"
assert File.exist?("packaging/packed_ruby.wasm"), "In build-default, didn't create packed_ruby.wasm"
assert File.exist?("packaging/spacewalk.js"), "In build-default, didn't create spacewalk.js"
end
end
end

0 comments on commit 12a42c3

Please sign in to comment.