Created
December 2, 2018 10:30
-
-
Save pfichtner/ac0e220975043fd92c34cf44510842c2 to your computer and use it in GitHub Desktop.
reruns all tests on each git commit and copy the results to tmp
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/sh | |
| DIRECTORY=$1 | |
| count=1 | |
| cd $DIRECTORY && git log --date-order --reverse --grep="autocommit on change" | grep ^commit | cut -d' ' -f2 | while read TAG; do | |
| git clean -fd && \ | |
| git reset --hard $TAG && \ | |
| rm -rf target/surefire-reports target/allure-results && \ | |
| mvn test ; \ | |
| TARGET=/tmp/target-`printf '%04d' $count` | |
| cp -ax $DIRECTORY/target $TARGET | |
| count=`expr $count + 1` | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment