-
-
Save IvoLimmen/c5b91de2b341fd00f075e5abd12b3e82 to your computer and use it in GitHub Desktop.
Just build what is needed
This file contains hidden or 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 | |
ARGS="$@" | |
set ARTIFACT= | |
for f in $(git status -s | cut -c 4- | cut -d/ -f1 - | sort -u) | |
do | |
if [ -d ${f} ] # must be a directory | |
then | |
if [ "${ARTIFACT}" == "" ] | |
then | |
ARTIFACT="${f}" | |
else | |
ARTIFACT="${ARTIFACT},${f}" | |
fi | |
fi | |
done | |
echo "Changes in: ${ARTIFACT}" | |
echo "Running: mvn ${ARGS} -pl ${ARTIFACT}" | |
mvn ${ARGS} -pl ${ARTIFACT} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment