Last active
February 20, 2017 20:24
-
-
Save danhaywood/e80daf6d25f5c1fb1093effba85d088a to your computer and use it in GitHub Desktop.
Script to obtain the time that an isisaddons or incode catalog module was released to Maven central repo.
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
if [ $# -ne 1 ]; then | |
echo "usage: `basename $0`: [ver]" >&2 | |
exit 1 | |
fi | |
VER=$1 | |
MODULE_DIR=$(cat bumpver_isis.sh | grep MODULE_DIR= | cut -d= -f2) | |
if [ -z "$MODULE_DIR" ]; then | |
echo "`basename $0`: could not determine \$MODULE_DIR" >&2 | |
exit 1 | |
fi | |
pushd $MODULE_DIR >/dev/null | |
GROUP_ID=$(mvn -q -Dexec.executable="echo" -Dexec.args='${project.groupId}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec 2>/dev/null) | |
ARTIFACT_ID=$(mvn -q -Dexec.executable="echo" -Dexec.args='${project.artifactId}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec 2>/dev/null) | |
GROUP_ID_DIR=$(echo $GROUP_ID | sed 's|\.|/|g') | |
#echo $GROUP_ID_DIR | |
#echo $ARTIFACT_ID | |
popd >/dev/null | |
LAST_MODIFIED=$(curl -l https://repo1.maven.org/maven2/$GROUP_ID_DIR/$ARTIFACT_ID/$VER/$ARTIFACT_ID-$VER.pom -I 2>/dev/null | grep Last-Modified) | |
echo $LAST_MODIFIED |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment