deploy.sh 701 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. set -euo pipefail
  3. # Make sure that Rust version is == 1.76.0 for now to avoid running into
  4. # https://github.com/rustwasm/wasm-pack/issues/1389
  5. # With newer versions, we get panics when (for example) running:
  6. # https://numbat.dev/doc/example-paper_size.html
  7. if ! rustc --version | grep -q "1.76.0"; then
  8. echo "Please switch to Rust version 1.76.0."
  9. echo "(rustup default 1.76.0)"
  10. exit 1
  11. fi
  12. current_branch=$(git rev-parse --abbrev-ref HEAD)
  13. if [[ "$current_branch" != "master" ]]; then
  14. echo "You are currently on the '$current_branch' branch, not 'master'."
  15. exit 1
  16. fi
  17. bash build.sh
  18. rsync --archive --stats --progress --human-readable -r www/ shark.fish:numbat.dev/