Last active
December 9, 2023 19:43
-
-
Save motlin/2b1f29eccb79825e6c43be2d60f1d7e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -uxo pipefail | |
VOICE='Serena (Premium)' | |
export LIFTWIZARD_FILE_MATCH_RULE_RERECORD=true | |
function checkLocalModification { | |
git diff --quiet | |
EXIT_CODE=$? | |
if [ $EXIT_CODE -ne 0 ]; then | |
echo "Locally modified files" | |
say --voice $VOICE "Locally modified files" | |
exit 1 | |
fi | |
} | |
function echoSay { | |
echo "$1" | |
say --voice "$VOICE" "$1" | |
} | |
COMMIT_MESSAGE=$(git log --format=%B -n 1 HEAD) | |
say --voice "$VOICE" "[[volm 0.10]] Beginning build of commit: $COMMIT_MESSAGE" & | |
./mvnw -Dmaven.build.cache.skipCache=true clean install --threads 8C --activate-profiles !shade | |
EXIT_CODE=$? | |
if [ $EXIT_CODE -eq 0 ]; then | |
checkLocalModification | |
exit 0 | |
fi | |
./mvnw install --activate-profiles !shade | |
echoSay "Build failed on commit: $COMMIT_MESSAGE" | |
exit $EXIT_CODE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment