monorepo/builders/rust.sh

27 lines
492 B
Bash
Executable File

if [[ ! -z "$MODULE" ]]; then
MODULE="-p $MODULE"
fi
case $CMD in
build)
$CARGO build $MODULE $PARAMS
;;
test)
$CARGO test $MODULE $PARAMS
;;
release)
$CARGO build --release $MODULE $PARAMS
;;
clean)
$CARGO clean $MODULE
;;
"")
echo "No command specified. Use build | test | release | clean"
;;
*)
echo "$CMD is unknown. Use build | test | release | clean"
;;
esac