You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by da...@apache.org on 2024/07/22 21:44:16 UTC
(causeway-app-petclinic) tag tags/3.1.0/01-01-starter-app updated (bf5abac -> 37bcedb)
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a change to tag tags/3.1.0/01-01-starter-app
in repository https://gitbox.apache.org/repos/asf/causeway-app-petclinic.git
*** WARNING: tag tags/3.1.0/01-01-starter-app was modified! ***
from bf5abac (commit)
to 37bcedb (commit)
omit bf5abac updates pom.xml files to 3.1.0
omit 1d48fe4 adds scripts to help generate new tags
new 37bcedb updates tagger.sh
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
tag are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (bf5abac)
\
N -- N -- N refs/tags/tags/3.1.0/01-01-starter-app (37bcedb)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
module-simple-tests/pom.xml | 2 +-
module-simple/pom.xml | 2 +-
pom.xml | 4 +-
tagger.sh | 91 +++++++++++++++++++++++++++++++--------------
webapp-tests/pom.xml | 2 +-
webapp/pom.xml | 2 +-
6 files changed, 69 insertions(+), 34 deletions(-)
(causeway-app-petclinic) 01/01: updates tagger.sh
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to tag tags/3.1.0/01-01-starter-app
in repository https://gitbox.apache.org/repos/asf/causeway-app-petclinic.git
commit 37bcedbf514976a5c591dc39b9871c05ae4ce865
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Jul 4 10:26:46 2024 +0100
updates tagger.sh
---
setver.sh | 45 ++++++++++++++++++++++++
tagger.sh | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 161 insertions(+)
diff --git a/setver.sh b/setver.sh
new file mode 100755
index 0000000..843f45b
--- /dev/null
+++ b/setver.sh
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+usage() {
+ echo "$(basename $0) -v version" >&2
+ echo "" >&2
+ echo "where:" >&2
+ echo " -v version to update to" >&2
+ echo "" >&2
+ echo "eg:" >&2
+ echo " $(basename $0) -v 2.1.0" >&2
+ exit 1
+}
+
+VERSION=$1
+
+while getopts ":v:" opt; do
+ case ${opt} in
+ v)
+ VERSION=$OPTARG
+ ;;
+ \? ) usage "Invalid option"
+ exit 1
+ ;;
+ : )
+ echo "Option -$OPTARG requires an argument." 1>&2; exit 1;;
+ esac
+done
+shift $((OPTIND -1))
+
+if [ -z "$VERSION" ]
+then
+ usage
+fi
+
+
+mvnd versions:update-parent -DparentVersion=[$VERSION,$VERSION] -Dskip.nightly
+mvnd versions:set -DnewVersion=$VERSION
+
+git add pom.xml
+git add module-simple-tests/pom.xml
+git add module-simple/pom.xml
+git add webapp-tests/pom.xml
+git add webapp/pom.xml
+
+git commit -m "updates pom.xml files to $VERSION"
diff --git a/tagger.sh b/tagger.sh
new file mode 100755
index 0000000..738f359
--- /dev/null
+++ b/tagger.sh
@@ -0,0 +1,116 @@
+#!/bin/bash
+
+usage() {
+ echo "$(basename $0) -p previous_version -v new_version -x" >&2
+ echo "" >&2
+ echo "where:" >&2
+ echo " -p previous version" >&2
+ echo " -v new version" >&2
+ echo " -x execute (otherwise, is a dry run)" >&2
+ echo "" >&2
+ echo "eg:" >&2
+ echo " $(basename $0) -p 2.0.0 -v 2.1.0" >&2
+ echo " $(basename $0) -p 3.0.0 -v 3.1.0 -x" >&2
+ echo "" >&2
+ exit 1
+}
+
+BASE_BRANCH="v2" # always ... we dynamically edit javax->jakarta
+PREV_VERSION=""
+NEW_VERSION=""
+EXECUTE=""
+
+while getopts ":b:p:v:x" opt; do
+ case ${opt} in
+ b)
+ BASE_BRANCH=$OPTARG
+ ;;
+ p)
+ PREV_VERSION=$OPTARG
+ ;;
+ v)
+ NEW_VERSION=$OPTARG
+ ;;
+ x)
+ EXECUTE="true"
+ ;;
+ \? ) usage "Invalid option"
+ exit 1
+ ;;
+ : )
+ echo "Option -$OPTARG requires an argument." 1>&2; exit 1;;
+ esac
+done
+shift $((OPTIND -1))
+
+#if [ "$BASE_BRANCH" != "v2" -a "$BASE_BRANCH" != "v3" ]
+#then
+# usage
+#fi
+
+if [ -z "$PREV_VERSION" -o -z "$NEW_VERSION" ]
+then
+ usage
+fi
+
+
+#echo "-b BASE_BRANCH : $BASE_BRANCH"
+echo "-p PREV_VERSION : $PREV_VERSION"
+echo "-v NEW_VERSION : $NEW_VERSION"
+echo "-x EXECUTE : $EXECUTE"
+
+
+PREV_TAG=""
+for TAG in $(git tag -l | grep "tags/$BASE_BRANCH/")
+do
+ NEW_TAG="tags/$NEW_VERSION/$(echo $TAG | cut -c9-)"
+
+ if [ -n "$PREV_TAG" ]
+ then
+ for COMMIT in $(git log $PREV_TAG..$TAG --pretty=format:"%H" --reverse)
+ do
+
+ echo "git cherry-pick $COMMIT"
+ if [ "$EXECUTE" = "true" ]
+ then
+ git cherry-pick $COMMIT
+
+ if [ $? -ne 0 ]
+ then
+ echo "Cherry-pick failed; aborting."
+ exit 1
+ fi
+ fi
+
+ if [ "$EXECUTE" = "true" ]
+ then
+ for POM_XML in $(find . -name "pom.xml")
+ do
+ sed -i "s/<version>$PREV_VERSION<\/version>/<version>$NEW_VERSION<\/version>/g" "$POM_XML"
+ done
+ for JAVA_FILE in $(find . -name "*.java")
+ do
+ sed -i "s/javax.annotation/jakarta.annotation/g" "$POM_XML"
+ sed -i "s/javax.inject/jakarta.inject/g" "$POM_XML"
+ sed -i "s/javax.persistence/jakarta.persistence/g" "$POM_XML"
+ sed -i "s/javax.xml.bind/jakarta.xml.bind/g" "$POM_XML"
+ done
+ if [ -n "$(git status --porcelain)" ]
+ then
+ git add .
+ git commit --amend --no-edit
+ fi
+ fi
+ done
+ fi
+
+ echo "git tag -f $NEW_TAG"
+
+ if [ "$EXECUTE" = "true" ]
+ then
+ git tag -d $NEW_TAG >/dev/null 2>&1
+ git tag -f $NEW_TAG
+ fi
+
+ PREV_TAG=$TAG
+done