Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Script to obtain the time that an isisaddons or incode catalog module was released to Maven central repo.
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