Skip to content

update version script

Tochiori Yausufmi edited this page Oct 31, 2019 · 4 revisions

Update for develop

#!/bin/bash -xe

MINOR_VERSION=$(
  sed -n 's|^    <version>[0-9]\+\.[0-9]\+\.\([0-9]\+\)</version>|\1|p' pom.xml
)
echo ${MINOR_VERSION}
MINOR_VERSION=$((++MINOR_VERSION))
echo ${MINOR_VERSION}

# update version in pom.xml
sed -i \
 "s|^\(    <version>[0-9]\+\.[0-9]\+\.\)[0-9]\+\(</version>\)|\1${MINOR_VERSION}-SNAPSHOT\2|" \
 pom.xml

# update version in personium-unit-config-default.properties
sed -i \
  "s|^\(io\.personium\.core\.version=[0-9]\+\.[0-9]\+\.\)[0-9]\+|\1${MINOR_VERSION}|" \
  src/main/resources/personium-unit-config-default.properties

Result:

diff --git a/pom.xml b/pom.xml
index ee6d04e..296b471 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
     <groupId>io.personium</groupId>
     <artifactId>personium-core</artifactId>
     <packaging>war</packaging>
-    <version>1.7.19</version>
+    <version>1.7.20-SNAPSHOT</version>
     <name>personium-core Maven Webapp</name>
     <url>http://maven.apache.org</url>
     <licenses>
diff --git a/src/main/resources/personium-unit-config-default.properties b/src/main/resources/personium-unit-config-default.properties
index 1396b90..9ea789c 100644
--- a/src/main/resources/personium-unit-config-default.properties
+++ b/src/main/resources/personium-unit-config-default.properties
@@ -25,7 +25,7 @@
 #################################################
 
 # core version
-io.personium.core.version=1.7.19
+io.personium.core.version=1.7.20
 
 # thread pool num.
 io.personium.core.thread.pool.num.io.cell=10

Update for master

#!/bin/bash -xe
sed -i 's|\-SNAPSHOT||' pom.xml