Run tests and then release build when no build is specified

This commit is contained in:
Savanni D'Gerinel 2023-08-07 18:34:02 -04:00
parent 679510b010
commit 98fac30ed6
2 changed files with 9 additions and 7 deletions

View File

@ -34,7 +34,7 @@ if [ -z "${TARGET-}" ]; then
fi
if [ -z "${CMD-}" ]; then
CMD="release"
CMD="test release"
fi
if [ "${CMD}" == "clean" ]; then
@ -42,8 +42,10 @@ if [ "${CMD}" == "clean" ]; then
exit 0
fi
for cmd in $CMD; do
if [ "${TARGET}" == "all" ]; then
build_rust_targets $CMD ${RUST_ALL_TARGETS[*]}
build_rust_targets $cmd ${RUST_ALL_TARGETS[*]}
else
build_rust_targets $CMD $TARGET
build_rust_targets $cmd $TARGET
fi
done

View File

@ -21,7 +21,7 @@ case $CMD in
$CARGO run $MODULE $PARAMS
;;
release)
$CARGO run --release $MODULE $PARAMS
$CARGO build --release $MODULE $PARAMS
;;
clean)
$CARGO clean $MODULE