X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fmaven-patch-release.sh;fp=shell%2Fmaven-patch-release.sh;h=4f49b4f55e13ca63e43498b05bed628f15aa2017;hb=ae3d96d6534ffc1e1de2e07ff9a4689bec11a90d;hp=d6e90805af110432c16d8829f152b77a8216ffe2;hpb=10a3854d4a96bd6845d7f4791ac564cfec7cb750;p=releng%2Fglobal-jjb.git diff --git a/shell/maven-patch-release.sh b/shell/maven-patch-release.sh index d6e90805..4f49b4f5 100644 --- a/shell/maven-patch-release.sh +++ b/shell/maven-patch-release.sh @@ -18,10 +18,10 @@ mkdir -p "$PATCH_DIR" set -eu -o pipefail echo "$PROJECT" "$(git rev-parse --verify HEAD)" | tee -a "$PATCH_DIR/taglist.log" - -# Strip -SNAPSHOT from version to prepare release. -find . -name "*.xml" -print0 | xargs -0 sed -i 's/-SNAPSHOT//g' - +if [[ "${MAVEN_VERSIONS_PLUGIN}" == "false" ]] ; then + # Strip -SNAPSHOT from version to prepare release. + find . -name "*.xml" -print0 | xargs -0 sed -i 's/-SNAPSHOT//g' +fi git commit -am "Release $PROJECT" git format-patch --stdout "origin/$GERRIT_BRANCH" > "$PATCH_DIR/${PROJECT//\//-}.patch" git bundle create "$PATCH_DIR/${PROJECT//\//-}.bundle" "origin/${GERRIT_BRANCH}..HEAD"