Tony CHEMIT pushed to branch develop-5.x at ultreia.io / ird-observe Commits: beff6db1 by Tony CHEMIT at 2017-03-10T16:26:09+01:00 improve scripts - - - - - 4 changed files: - bin/release_create.sh - bin/stage_create.sh - bin/stage_drop.sh - bin/stage_release.sh Changes: ===================================== bin/release_create.sh ===================================== --- a/bin/release_create.sh +++ b/bin/release_create.sh @@ -29,7 +29,7 @@ if [ ! "$?" == "0" ]; then 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}') +STAGE_ID=$(mvn nexus-staging:rc-list -N | grep ${STAGE} | grep OPEN | cut -d' ' -f2) 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 @@ -39,4 +39,4 @@ if [ ! "$?" == "0" ]; then 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 +mvn nexus-staging:release -N -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 @@ -29,7 +29,7 @@ if [ ! "$?" == "0" ]; then 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}') +STAGE_ID=$(mvn nexus-staging:rc-list -N | grep ${STAGE} | grep OPEN | cut -d' ' -f2) 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 ===================================== bin/stage_drop.sh ===================================== --- a/bin/stage_drop.sh +++ b/bin/stage_drop.sh @@ -11,7 +11,7 @@ rm -rf ${LOG_DIR} mkdir -p ${LOG_DIR} echo "Get staging id..." -STAGE_ID=$(mvn nexus-staging:rc-list | grep ${STAGE} | cut -d' ' -f2 | awk '/./{line=$0} END{print line}') +STAGE_ID=$(mvn -N nexus-staging:rc-list | grep ${STAGE} | cut -d' ' -f2 ) echo "Stage drop: $STAGE_ID ($LOG_DIR/stage-drop.log)" mvn nexus-staging:drop -DstagingRepositoryId=${STAGE_ID} --log-file --log-file ${LOG_DIR}/stage-release.log ===================================== bin/stage_release.sh ===================================== --- a/bin/stage_release.sh +++ b/bin/stage_release.sh @@ -1,8 +1,6 @@ #!/usr/bin/env sh PROJECT=ird-observe -MASTER=master-5.x -DEVELOP=develop-5.x STAGE=frirdobserve LOG_DIR=/tmp/${PROJECT}-stage @@ -11,7 +9,7 @@ rm -rf ${LOG_DIR} mkdir -p ${LOG_DIR} echo "Get staging id..." -STAGE_ID=$(mvn nexus-staging:rc-list | grep ${STAGE} | cut -d' ' -f2 | awk '/./{line=$0} END{print line}') +STAGE_ID=$(mvn -N nexus-staging:rc-list | grep ${STAGE} | grep CLOSED | cut -d' ' -f2) echo "Stage release: $STAGE_ID ($LOG_DIR/stage-release.log)" -mvn nexus-staging:release -DstagingRepositoryId=${STAGE_ID} --log-file --log-file ${LOG_DIR}/stage-release.log +mvn nexus-staging:release -N -DstagingRepositoryId=${STAGE_ID} --log-file --log-file ${LOG_DIR}/stage-release.log View it on GitLab: https://gitlab.com/ultreia.io/ird-observe/commit/beff6db191d295c3d60bb6f3542...