[Git][ultreia.io/ird-observe][develop-5.x] improve + add script
Tony CHEMIT pushed to branch develop-5.x at ultreia.io / ird-observe Commits: fc93c94c by Tony CHEMIT at 2017-03-10T16:06:13+01:00 improve + add script - - - - - 3 changed files: - + bin/release_create.sh - bin/stage_create.sh - pom.xml Changes: ===================================== bin/release_create.sh ===================================== --- /dev/null +++ b/bin/release_create.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash + +PROJECT=ird-observe +MASTER=master-5.x +DEVELOP=develop-5.x +STAGE=frirdobserve + +VERSION=$(grep -e "-SNAPSHOT" pom.xml | cut -d'>' -f2 | cut -d'<' -f1) +VERSION=${VERSION/-SNAPSHOT/} +LOG_DIR=/tmp/${PROJECT}-${VERSION} +echo "version to release: $VERSION" +echo "log dir: $LOG_DIR" +rm -rf ${LOG_DIR} +mkdir -p ${LOG_DIR} + +git checkout -B ${MASTER} +git checkout -B ${DEVELOP} + +echo "Start release: $VERSION ($LOG_DIR/release-start.log)" +mvn jgitflow:release-start -B -Prelease-profile --log-file ${LOG_DIR}/release-start.log +if [ ! "$?" == "0" ]; then + echo "Error" + exit 1 +fi +echo "Finish release: $VERSION ($LOG_DIR/release-finish.log)" +mvn jgitflow:release-finish -Prelease-profile --log-file ${LOG_DIR}/release-finish.log +if [ ! "$?" == "0" ]; then + echo "Error" + exit 1 +fi +echo "Get staging id..." +STAGE_ID=$(mvn nexus-staging:rc-list -N | grep ${STAGE} | cut -d' ' -f2 | awk '/./{line=$0} END{print line}') + +echo "Closing stage: $STAGE_ID ($LOG_DIR/stage-close.log)" +mvn nexus-staging:close -N -DstagingRepositoryId=${STAGE_ID} --log-file ${LOG_DIR}/release-close.log +if [ ! "$?" == "0" ]; then + echo "Error" + exit 1 +fi + +echo "Release stage: $STAGE_ID ($LOG_DIR/stage-release.log)" +mvn nexus-staging:release -DstagingRepositoryId=${STAGE_ID} --log-file --log-file ${LOG_DIR}/stage-release.log ===================================== bin/stage_create.sh ===================================== --- a/bin/stage_create.sh +++ b/bin/stage_create.sh @@ -31,7 +31,7 @@ fi echo "Get staging id..." STAGE_ID=$(mvn nexus-staging:rc-list -N | grep ${STAGE} | cut -d' ' -f2 | awk '/./{line=$0} END{print line}') -echo "Closing stage: $STAGE_ID ($LOG_DIR/release-close.log)" +echo "Closing stage: $STAGE_ID ($LOG_DIR/stage-close.log)" mvn nexus-staging:close -N -DstagingRepositoryId=${STAGE_ID} --log-file ${LOG_DIR}/release-close.log if [ ! "$?" == "0" ]; then echo "Error" ===================================== pom.xml ===================================== --- a/pom.xml +++ b/pom.xml @@ -165,8 +165,6 @@ <organizationId>ultreia.io</organizationId> <projectId>ird-observe</projectId> - <gitlabPluginVersion>1.0.4</gitlabPluginVersion> - <eugenePluginVersion>3.0-alpha-10</eugenePluginVersion> <processorPluginVersion>1.3</processorPluginVersion> <jaxxVersion>2.42</jaxxVersion> @@ -214,7 +212,7 @@ <gitlab.changesTitle>ObServe changelog</gitlab.changesTitle> <gitlab.changesAuthor>Tony Chemit</gitlab.changesAuthor> <gitlab.changesAuthorEmail>dev@tchemit.fr</gitlab.changesAuthorEmail> - <gitlab.trackers>Anomalie,Evolution,Tache</gitlab.trackers> + <gitlab.trackers>Anomalie,Evolution,Tâche</gitlab.trackers> <maven.build.timestamp.format>dd/MM/yyyy HH:mm z</maven.build.timestamp.format> <buildDate>${maven.build.timestamp}</buildDate> View it on GitLab: https://gitlab.com/ultreia.io/ird-observe/commit/fc93c94c386bfdb3e65279e6035...
participants (1)
-
Tony CHEMIT