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
|
||||
}
|
||||
|
||||
# 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
|
||||
# Arguments:
|
||||
# $1: directory of pom
|
||||
|
@ -75,7 +89,7 @@ function push_new_poms() {
|
|||
#to compensate new updates
|
||||
$debug git pull
|
||||
$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)
|
||||
$debug git remote add deployment "https://$GH_TOKEN@github.com/$reqRepo.git"
|
||||
|
@ -167,7 +181,7 @@ function main {
|
|||
done
|
||||
|
||||
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
|
||||
echo 'GH_TOKEN not set' >&2
|
||||
exit 1
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-parent</artifactId>
|
||||
<version>0.0.2-SNAPSHOT</version>
|
||||
<version>0.0.3-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-cdi-example</artifactId>
|
||||
<version>0.0.2-SNAPSHOT</version>
|
||||
<version>0.0.3-SNAPSHOT</version>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<properties>
|
||||
|
@ -23,13 +23,13 @@
|
|||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-core</artifactId>
|
||||
<version>0.0.2-SNAPSHOT</version>
|
||||
<version>0.0.3-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-cdi</artifactId>
|
||||
<version>0.0.2-SNAPSHOT</version>
|
||||
<version>0.0.3-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -3,7 +3,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-cdi</artifactId>
|
||||
<version>0.0.2-SNAPSHOT</version>
|
||||
<version>0.0.3-SNAPSHOT</version>
|
||||
|
||||
<name>${project.groupId}:${project.artifactId}</name>
|
||||
<description>TODO</description>
|
||||
|
@ -153,7 +153,7 @@
|
|||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-core</artifactId>
|
||||
<version>0.0.2-SNAPSHOT</version>
|
||||
<version>0.0.3-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-core</artifactId>
|
||||
<version>0.0.2-SNAPSHOT</version>
|
||||
<version>0.0.3-SNAPSHOT</version>
|
||||
|
||||
<name>${project.groupId}:${project.artifactId}</name>
|
||||
<description>TODO</description>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-spring-example</artifactId>
|
||||
<version>0.0.2-SNAPSHOT</version>
|
||||
<version>0.0.3-SNAPSHOT</version>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
|
@ -42,12 +42,12 @@
|
|||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-core</artifactId>
|
||||
<version>0.0.2-SNAPSHOT</version>
|
||||
<version>0.0.3-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-spring</artifactId>
|
||||
<version>0.0.2-SNAPSHOT</version>
|
||||
<version>0.0.3-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-spring</artifactId>
|
||||
<version>0.0.2-SNAPSHOT</version>
|
||||
<version>0.0.3-SNAPSHOT</version>
|
||||
|
||||
<name>${project.groupId}:${project.artifactId}</name>
|
||||
<description>TODO</description>
|
||||
|
@ -158,7 +158,7 @@
|
|||
<dependency>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-core</artifactId>
|
||||
<version>0.0.2-SNAPSHOT</version>
|
||||
<version>0.0.3-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
|
Loading…
Reference in New Issue