TSK-26: now inrementing last number when writing back to github
This commit is contained in:
parent
b33afe838c
commit
1767a7286c
|
|
@ -57,6 +57,20 @@ function deploy {
|
||||||
$debug mvn deploy -f "$1" -P "$2" --settings "$3" -DskipTests=true -B -U
|
$debug mvn deploy -f "$1" -P "$2" --settings "$3" -DskipTests=true -B -U
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# takes a version (without leading v) and increments its
|
||||||
|
# last number by one.
|
||||||
|
# Arguments:
|
||||||
|
# $1: version (without leading v) which will be patched
|
||||||
|
# Return:
|
||||||
|
# version with last number incremented
|
||||||
|
function patch_version() {
|
||||||
|
if [[ ! "$1" =~ [0-9]+\.[0-9]+\.[0-9]+ ]]; then
|
||||||
|
echo "'$1' does not match tag pattern." >&2
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
echo "${1%\.*}.`expr ${1##*\.*\.} + 1`"
|
||||||
|
}
|
||||||
|
|
||||||
# changing version in pom and all its children
|
# changing version in pom and all its children
|
||||||
# Arguments:
|
# Arguments:
|
||||||
# $1: directory of pom
|
# $1: directory of pom
|
||||||
|
|
@ -75,7 +89,7 @@ function push_new_poms() {
|
||||||
#to compensate new updates
|
#to compensate new updates
|
||||||
$debug git pull
|
$debug git pull
|
||||||
$debug git add "./*pom.xml"
|
$debug git add "./*pom.xml"
|
||||||
$debug git commit -m "Updated poms to version ${TRAVIS_TAG##v}-SNAPSHOT"
|
$debug git commit -m "Updated poms to version `patch_version ${TRAVIS_TAG##v}`-SNAPSHOT"
|
||||||
|
|
||||||
#push poms (authentication via GH_TOKEN)
|
#push poms (authentication via GH_TOKEN)
|
||||||
$debug git remote add deployment "https://$GH_TOKEN@github.com/$reqRepo.git"
|
$debug git remote add deployment "https://$GH_TOKEN@github.com/$reqRepo.git"
|
||||||
|
|
@ -167,7 +181,7 @@ function main {
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ -n "$branch" && -n "$parent_dir" ]]; then
|
if [[ -n "$branch" && -n "$parent_dir" ]]; then
|
||||||
change_version "$parent_dir" "${TRAVIS_TAG##v}-SNAPSHOT"
|
change_version "$parent_dir" "`patch_version ${TRAVIS_TAG##v}`-SNAPSHOT"
|
||||||
if [[ -z "$GH_TOKEN" ]]; then
|
if [[ -z "$GH_TOKEN" ]]; then
|
||||||
echo 'GH_TOKEN not set' >&2
|
echo 'GH_TOKEN not set' >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>pro.taskana</groupId>
|
<groupId>pro.taskana</groupId>
|
||||||
<artifactId>taskana-parent</artifactId>
|
<artifactId>taskana-parent</artifactId>
|
||||||
<version>0.0.2-SNAPSHOT</version>
|
<version>0.0.3-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>pro.taskana</groupId>
|
<groupId>pro.taskana</groupId>
|
||||||
<artifactId>taskana-cdi-example</artifactId>
|
<artifactId>taskana-cdi-example</artifactId>
|
||||||
<version>0.0.2-SNAPSHOT</version>
|
<version>0.0.3-SNAPSHOT</version>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|
@ -23,13 +23,13 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>pro.taskana</groupId>
|
<groupId>pro.taskana</groupId>
|
||||||
<artifactId>taskana-core</artifactId>
|
<artifactId>taskana-core</artifactId>
|
||||||
<version>0.0.2-SNAPSHOT</version>
|
<version>0.0.3-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>pro.taskana</groupId>
|
<groupId>pro.taskana</groupId>
|
||||||
<artifactId>taskana-cdi</artifactId>
|
<artifactId>taskana-cdi</artifactId>
|
||||||
<version>0.0.2-SNAPSHOT</version>
|
<version>0.0.3-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>pro.taskana</groupId>
|
<groupId>pro.taskana</groupId>
|
||||||
<artifactId>taskana-cdi</artifactId>
|
<artifactId>taskana-cdi</artifactId>
|
||||||
<version>0.0.2-SNAPSHOT</version>
|
<version>0.0.3-SNAPSHOT</version>
|
||||||
|
|
||||||
<name>${project.groupId}:${project.artifactId}</name>
|
<name>${project.groupId}:${project.artifactId}</name>
|
||||||
<description>TODO</description>
|
<description>TODO</description>
|
||||||
|
|
@ -153,7 +153,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>pro.taskana</groupId>
|
<groupId>pro.taskana</groupId>
|
||||||
<artifactId>taskana-core</artifactId>
|
<artifactId>taskana-core</artifactId>
|
||||||
<version>0.0.2-SNAPSHOT</version>
|
<version>0.0.3-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>pro.taskana</groupId>
|
<groupId>pro.taskana</groupId>
|
||||||
<artifactId>taskana-core</artifactId>
|
<artifactId>taskana-core</artifactId>
|
||||||
<version>0.0.2-SNAPSHOT</version>
|
<version>0.0.3-SNAPSHOT</version>
|
||||||
|
|
||||||
<name>${project.groupId}:${project.artifactId}</name>
|
<name>${project.groupId}:${project.artifactId}</name>
|
||||||
<description>TODO</description>
|
<description>TODO</description>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>pro.taskana</groupId>
|
<groupId>pro.taskana</groupId>
|
||||||
<artifactId>taskana-spring-example</artifactId>
|
<artifactId>taskana-spring-example</artifactId>
|
||||||
<version>0.0.2-SNAPSHOT</version>
|
<version>0.0.3-SNAPSHOT</version>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
|
|
@ -42,12 +42,12 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>pro.taskana</groupId>
|
<groupId>pro.taskana</groupId>
|
||||||
<artifactId>taskana-core</artifactId>
|
<artifactId>taskana-core</artifactId>
|
||||||
<version>0.0.2-SNAPSHOT</version>
|
<version>0.0.3-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>pro.taskana</groupId>
|
<groupId>pro.taskana</groupId>
|
||||||
<artifactId>taskana-spring</artifactId>
|
<artifactId>taskana-spring</artifactId>
|
||||||
<version>0.0.2-SNAPSHOT</version>
|
<version>0.0.3-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>pro.taskana</groupId>
|
<groupId>pro.taskana</groupId>
|
||||||
<artifactId>taskana-spring</artifactId>
|
<artifactId>taskana-spring</artifactId>
|
||||||
<version>0.0.2-SNAPSHOT</version>
|
<version>0.0.3-SNAPSHOT</version>
|
||||||
|
|
||||||
<name>${project.groupId}:${project.artifactId}</name>
|
<name>${project.groupId}:${project.artifactId}</name>
|
||||||
<description>TODO</description>
|
<description>TODO</description>
|
||||||
|
|
@ -158,7 +158,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>pro.taskana</groupId>
|
<groupId>pro.taskana</groupId>
|
||||||
<artifactId>taskana-core</artifactId>
|
<artifactId>taskana-core</artifactId>
|
||||||
<version>0.0.2-SNAPSHOT</version>
|
<version>0.0.3-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue