build.sh 484 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/usr/bin/env bash
  2. set -euo pipefail
  3. IFS=$'\n\t'
  4. script() {
  5. name="$1"
  6. shift
  7. go run "script/$name.go" "$@"
  8. }
  9. build() {
  10. go run build.go "$@"
  11. }
  12. case "${1:-default}" in
  13. test)
  14. LOGGER_DISCARD=1 build test
  15. ;;
  16. bench)
  17. LOGGER_DISCARD=1 build bench
  18. ;;
  19. prerelease)
  20. script authors
  21. build weblate
  22. pushd man ; ./refresh.sh ; popd
  23. git add -A gui man AUTHORS
  24. git commit -m 'gui, man, authors: Update docs, translations, and contributors'
  25. ;;
  26. *)
  27. build "$@"
  28. ;;
  29. esac