Skip to content

Instantly share code, notes, and snippets.

@thomashartm
Created June 19, 2019 09:08
Show Gist options
  • Save thomashartm/ca56137d6c3495fb480449b5c3f03a07 to your computer and use it in GitHub Desktop.
Save thomashartm/ca56137d6c3495fb480449b5c3f03a07 to your computer and use it in GitHub Desktop.
Find snapshot version in a pom
#!/bin/bash
for i in $(grep '<version>' pom.xml); do
version=${i%<*};
version=${version#*>};
if [[ $version == *"SNAPSHOT"* ]]
then
echo "$version";
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment