Compare commits
6 Commits
master
...
do-release
| Author | SHA1 | Date | |
|---|---|---|---|
| a5e74216c1 | |||
| fde51cff62 | |||
| 313c9fa696 | |||
| c6d977babe | |||
| ee386225a4 | |||
| 87ac9cce7d |
@@ -9,7 +9,7 @@ pipeline {
|
||||
stage('Clone Minager-properties repository') {
|
||||
steps {
|
||||
dir('minager-properties') {
|
||||
git url:'https://gogs.takiguchi.ovh/Minager/minager-properties.git', branch: 'master', credentialsId: 'a6494064-8130-42fd-9d3d-e7734518c79e'
|
||||
git url:'https://gogs.takiguchi.ovh/Minager/minager-properties.git', branch: 'do-release', credentialsId: 'a6494064-8130-42fd-9d3d-e7734518c79e'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
2
pom.xml
2
pom.xml
@@ -5,7 +5,7 @@
|
||||
|
||||
<groupId>org.minager</groupId>
|
||||
<artifactId>minager</artifactId>
|
||||
<version>1.2.0</version>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Minager</name>
|
||||
|
||||
23
src/main/bash/do-release.bash
Normal file → Executable file
23
src/main/bash/do-release.bash
Normal file → Executable file
@@ -6,13 +6,16 @@ function setVersion()
|
||||
|
||||
echo 'Update properties file'
|
||||
sed -i -z -E "s/minager:\n version: ([0-9]+(\.[0-9]+){2}(-SNAPSHOT)?)/minager:\n version: $1/" \
|
||||
minager-properties/application-prod.yml
|
||||
../minager-properties/application-prod.yml
|
||||
|
||||
echo 'Update Angular app version'
|
||||
sed -i -E "s/appVersion: '([0-9]+(\.[0-9]+){2}(-SNAPSHOT)?)'/appVersion: $1/" \
|
||||
src/main/ts/src/environments/environment.prod.ts
|
||||
}
|
||||
|
||||
BRANCH_NAME=do-release
|
||||
cd ../../..
|
||||
|
||||
echo 'Retreive the project version...'
|
||||
VERSION=$(mvn -q \
|
||||
-Dexec.executable="echo" \
|
||||
@@ -37,21 +40,25 @@ setVersion $RELEASE_VERSION
|
||||
|
||||
echo 'Git tag for release freezing'
|
||||
git tag $RELEASE_VERSION
|
||||
cd minager-properties && git tag $RELEASE_VERSION && cd ..
|
||||
cd ../minager-properties || exit 1
|
||||
git tag $RELEASE_VERSION || exit 1
|
||||
cd - || exit 1
|
||||
|
||||
echo 'Change files to next version'
|
||||
setVersion $NEXT_VERSION
|
||||
|
||||
echo 'Git commit and push'
|
||||
# Minager-properties
|
||||
cd minager-properties
|
||||
git add application-prod.yml
|
||||
git commit -m "Set version for next iteration: $NEXT_VERSION"
|
||||
git push origin master
|
||||
cd ..
|
||||
cd ../minager-properties || exit 1
|
||||
git add application-prod.yml || exit 1
|
||||
git commit -m "Set version for next iteration: $NEXT_VERSION" || exit 1
|
||||
git push origin $BRANCH_NAME || exit 1
|
||||
git push origin --tags || exit 1
|
||||
cd - || exit 1
|
||||
|
||||
# Minager
|
||||
git add pom.xml
|
||||
git add src/main/ts/src/environments/environment.prod.ts
|
||||
git commit -m "Set version for next iteration: $NEXT_VERSION"
|
||||
git push origin master
|
||||
git push origin $BRANCH_NAME
|
||||
git push origin --tags
|
||||
@@ -1,5 +1,5 @@
|
||||
export const environment = {
|
||||
production: true,
|
||||
appVersion: '1.2.0',
|
||||
appVersion: '1.3.0-SNAPSHOT',
|
||||
title: ''
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user