Selaa lähdekoodia

Move rustc version check from deploy.sh to build.sh

David Peter 1 vuosi sitten
vanhempi
sitoutus
93340bb93b
2 muutettua tiedostoa jossa 10 lisäystä ja 9 poistoa
  1. 10 0
      numbat-wasm/build.sh
  2. 0 9
      numbat-wasm/deploy.sh

+ 10 - 0
numbat-wasm/build.sh

@@ -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

+ 0 - 9
numbat-wasm/deploy.sh

@@ -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/