Skip to content

Instantly share code, notes, and snippets.

@iocanel
Created April 15, 2020 09:46
Show Gist options
  • Save iocanel/69582ce24b6610837079389173e9fcbc to your computer and use it in GitHub Desktop.
Save iocanel/69582ce24b6610837079389173e9fcbc to your computer and use it in GitHub Desktop.
For each release show which version of the specified depnency was used.
#!/bin/bash
DEPENDENCY=$1
git log | grep "prepare release" -B4 | grep commit | cut -d " " -f2 | while read commit
do
release=`git log | grep $commit -A4 | grep maven-release-plugin | awk -F " " '{print $NF}'`
version=`git show $commit:pom.xml | grep "<${DEPENDENCY}.version>" | awk -F ">|<" '{print $3}'`
echo "Release: $release $DEPENDENCY $version"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment