You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2021/07/13 05:49:00 UTC

[isis-app-simpleapp] 02/03: improves and renames update-parent.sh

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch jpa-SNAPSHOT
in repository https://gitbox.apache.org/repos/asf/isis-app-simpleapp.git

commit dce145bb7f84fb8394ddcbf355ff4769e1bc4997
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Jul 13 06:48:06 2021 +0100

    improves and renames update-parent.sh
---
 update-parent-to-latest.sh |  6 ------
 update-parent.sh           | 15 +++++++++++++++
 2 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/update-parent-to-latest.sh b/update-parent-to-latest.sh
deleted file mode 100644
index 6aa6b97..0000000
--- a/update-parent-to-latest.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-PARENT=$(curl -X GET "https://nexus.incode.work/service/rest/v1/search?sort=version&repository=nightly-builds&group=org.apache.isis.app&name=isis-app-starter-parent" -H "accept: application/json" -s | jq '.items[0].version' | sed 's/"//g')
-echo "parentVersion = $PARENT"
-mvn versions:update-parent -DparentVersion="[$PARENT]"
-
-git add pom.xml
-git commit -m "updates parent pom to $PARENT"
diff --git a/update-parent.sh b/update-parent.sh
new file mode 100644
index 0000000..de78ca7
--- /dev/null
+++ b/update-parent.sh
@@ -0,0 +1,15 @@
+
+if [ $# = 1 ]; then
+  PARENT=$1
+else
+  PARENT=$(curl -X GET "https://nexus.incode.work/service/rest/v1/search?sort=version&repository=nightly-builds&group=org.apache.isis.app&name=isis-app-starter-parent" -H "accept: application/json" -s | jq '.items[0].version' | sed 's/"//g')
+fi
+
+echo "parentVersion = $PARENT"
+mvn versions:update-parent -DparentVersion="[$PARENT]"
+
+CURR=$(grep "<isis.version>" pom.xml | head -1 | cut -d'>' -f2 | cut -d'<' -f1)
+sed -i "s|<isis.version>$CURR</isis.version>|<isis.version>$PARENT</isis.version>|g" pom.xml
+
+git add pom.xml
+git commit -m "updates parent pom to $PARENT"