Update to use date-time plus git hash as part of version (instead of snapshots)

This commit is contained in:
2024-08-22 09:34:35 -05:00
parent a52fd34e7d
commit 9d64c34d8b

View File

@ -7,6 +7,8 @@ fi
if [ "$CIRCLE_BRANCH" == "dev" ] || [ "$CIRCLE_BRANCH" == "staging" ] || [ "$CIRCLE_BRANCH" == "main" ] || [ \! -z $(echo "$CIRCLE_TAG" | grep "^version-") ]; then
echo "On a primary branch or tag [${CIRCLE_BRANCH}${CIRCLE_TAG}] - will not edit the pom version.";
echo "(or do we need to do this for dev...?)"
echo "(maybe we do this if the current version is a SNAPSHOT?")"
exit 0;
fi
@ -17,6 +19,8 @@ else
fi
POM=$(dirname $0)/../pom.xml
UNIQ=$(date +%Y%m%d-%H%M%S)-$(git rev-parse --short HEAD)
SLUG="${SLUG}-${UNIQ}"
echo "Updating $POM <revision> to: $SLUG"
sed -i "s/<revision>.*/<revision>$SLUG<\/revision>/" $POM