Created
December 2, 2018 10:32
-
-
Save pfichtner/a0743db56f3e1865b2c637dddd5e7123 to your computer and use it in GitHub Desktop.
Checks out each commit and copies $COPY_ONLY of each revision 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 | |
| dir=$1 | |
| COPY_ONLY=target/surefire-reports | |
| count=1 | |
| #git log $dir | grep ^commit | cut -d' ' -f2 | while read TAG; do | |
| cd $dir && git branch -a --sort=committerdate | grep -v ' -> ' | while read TAG; do | |
| echo $count $TAG | |
| count=`expr $count + 1` && \ | |
| git clean -fd && \ | |
| git reset --hard $TAG && \ | |
| TARGET=/tmp/git-`printf '%04d' $count` | |
| mkdir $TARGET && \ | |
| cp -ax $dir$COPY_ONLY $TARGET | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment