mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-17 20:50:44 +00:00
Feedback from code review
This commit is contained in:
@ -1,13 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
## todo - some version of:
|
||||
## - main (or -version tag?) noop?
|
||||
## - dev ... replace -SNAPSHOT w/ -${timestamp}
|
||||
## - other tags ... replace -SNAPSHOT w/ -${tag}-${timestamp}
|
||||
############################################################################
|
||||
## adjust-pom.version.sh
|
||||
## During CircleCI builds - edit the qqq parent pom.xml, to set the
|
||||
## <revision> value such that:
|
||||
## - feature-branch builds, tagged as snapshot-*, deploy with a version
|
||||
## number that includes that tag's name (minus the snapshot- part)
|
||||
## - integration-branch builds deploy with a version number that includes
|
||||
## the branch name slugified
|
||||
## - we never deploy -SNAPSHOT versions any more - because we don't believe
|
||||
## it is ever valid to not know exactly what versions you are getting
|
||||
## (perhaps because we are too loose with our versioning?)
|
||||
############################################################################
|
||||
|
||||
POM=$(dirname $0)/../pom.xml
|
||||
echo "On branch: $CIRCLE_BRANCH, tag: $CIRCLE_TAG..."
|
||||
|
||||
######################################################################
|
||||
## ## only do anything if the committed pom has a -SNAPSHOT version ##
|
||||
######################################################################
|
||||
REVISION=$(grep '<revision>' $POM | sed 's/.*<revision>//;s/<.*//');
|
||||
echo "<revision> in pom.xml is: $REVISION"
|
||||
if [ \! $(echo "$REVISION" | grep SNAPSHOT) ]; then
|
||||
@ -15,6 +26,9 @@ if [ \! $(echo "$REVISION" | grep SNAPSHOT) ]; then
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
##################################################################################
|
||||
## ## figure out if we need a SLUG: a snapshot- tag, or an integration/ branch ##
|
||||
##################################################################################
|
||||
SLUG=""
|
||||
if [ $(echo "$CIRCLE_TAG" | grep ^snapshot-) ]; then
|
||||
SLUG=$(echo "$CIRCLE_TAG" | sed "s/^snapshot-//")-
|
||||
@ -25,6 +39,9 @@ elif [ $(echo "$CIRCLE_BRANCH" | grep ^integration/) ]; then
|
||||
echo "Using slug [$SLUG] from branch [$CIRCLE_BRANCH]"
|
||||
fi
|
||||
|
||||
################################################################
|
||||
## ## build the replcaement for -SNAPSHOT, and update the pom ##
|
||||
################################################################
|
||||
TIMESTAMP=$(date +%Y%m%d-%H%M%S)
|
||||
REPLACEMENT=${SLUG}${TIMESTAMP}
|
||||
|
||||
|
@ -105,7 +105,7 @@ commands:
|
||||
- run:
|
||||
name: Run Maven Jar Deploy
|
||||
command: |
|
||||
mvn -s .circleci/mvn-settings.xml -T4 flatten:flatten jar:jar deploy:deploy -DuniqueVersion=false
|
||||
mvn -s .circleci/mvn-settings.xml -T4 flatten:flatten jar:jar deploy:deploy
|
||||
- save_cache:
|
||||
paths:
|
||||
- ~/.m2
|
||||
|
Reference in New Issue
Block a user