Last active
July 25, 2019 19:20
-
-
Save jglick/b0ff2942a78573bd64379500c015288c to your computer and use it in GitHub Desktop.
run with optional args, e.g., {workflow,pipeline}-*-plugin
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 | |
# http://stackoverflow.com/a/37730085/12916 | |
if [ $# -ge 1 ] | |
then | |
files="$@" | |
else | |
files=* | |
fi | |
for r in $files | |
do | |
echo considering $r | |
if [ -f $r/pom.xml ] && egrep -q '<tag>(HEAD|master|[$][{]scmTag[}])</tag>' $r/pom.xml | |
then | |
cd $r | |
echo "====== $r =====" | |
git pull --ff-only | |
git log --merges $(git log --reverse --ancestry-path --pretty=%H $(git describe --abbrev=0 HEAD)..HEAD | head -1)...HEAD | |
cd .. | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment