Skip to content

Commit

Permalink
Move rustc version check from deploy.sh to build.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkdp authored and David Peter committed Aug 29, 2024
1 parent 29a99e9 commit 93340bb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
10 changes: 10 additions & 0 deletions numbat-wasm/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,15 @@

set -euo pipefail

# Make sure that Rust version is == 1.76.0 for now to avoid running into
# https://github.com/rustwasm/wasm-pack/issues/1389
# With newer versions, we get panics when (for example) running:
# https://numbat.dev/doc/example-paper_size.html
if ! rustc --version | grep -q "1.76.0"; then
echo "Please switch to Rust version 1.76.0."
echo "(rustup default 1.76.0)"
exit 1
fi

rm -rf www/pkg
wasm-pack build --target=web --out-dir=www/pkg
9 changes: 0 additions & 9 deletions numbat-wasm/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,6 @@ if [[ "$current_branch" != "master" ]]; then
exit 1
fi

# Make sure that Rust version is == 1.76.0 for now to avoid running into
# https://github.com/rustwasm/wasm-pack/issues/1389
# With newer versions, we get panics when (for example) running:
# https://numbat.dev/doc/example-paper_size.html
if ! rustc --version | grep -q "1.76.0"; then
echo "Please switch to Rust version 1.76.0."
exit 1
fi

bash build.sh

rsync --archive --stats --progress --human-readable -r www/ shark.fish:numbat.dev/

0 comments on commit 93340bb

Please sign in to comment.