gitbutler/scripts/check.sh
extrawurst eb569b389c * cleanup combined bin/lib in gitbutler
* gitbutler as a lib is `gblib` now and used accordingly by `butler`
* use `cargo-cranky` for shared lints across workspace until cargo supports Cargo.toml lints section in 1.75
2023-10-18 16:39:14 +02:00

40 lines
424 B
Bash
Executable File

#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
function rust() {
cargo fmt --check
cargo sort -c -w
cargo cranky --all-targets --all-features
cargo test
}
function node() {
pnpm lint
pnpm check
}
if [[ "$#" -eq 0 ]]; then
set -o xtrace
rust
node
else
case "$1" in
rust)
set -o xtrace
rust
;;
node)
set -o xtrace
node
;;
*)
echo "Invalid argument: $1"
exit 1
;;
esac
exit 0
fi