summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
10a3854)
When maven-versions-plugin is set to "true", the job will
use the versions plugin to update the versions in the pom.xml
files and will not need this step in maven-patch-release.sh to
happen.
This change DOES NOT affect current jobs which do not use the
maven versions plugin as this variable is set to false by default.
Update maven-versions-plugin variable in the parameters to be able
to parse the value in the scripts.
Change-Id: Ic25197012fd0f23a859159bb86369feb8a02b9c2
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
mvn-params: '{mvn-params}'
mvn-version: '{mvn-version}'
staging-profile-id: '{staging-profile-id}'
mvn-params: '{mvn-params}'
mvn-version: '{mvn-version}'
staging-profile-id: '{staging-profile-id}'
+ - bool:
+ name: MAVEN_VERSIONS_PLUGIN
+ default: '{maven-versions-plugin}'
+ description: Use maven-versions-plugin to update pom versions.
- string:
name: ARCHIVE_ARTIFACTS
default: '{archive-artifacts}'
- string:
name: ARCHIVE_ARTIFACTS
default: '{archive-artifacts}'
- lf-provide-maven-settings:
global-settings-file: '{mvn-global-settings}'
settings-file: '{mvn-settings}'
- lf-provide-maven-settings:
global-settings-file: '{mvn-global-settings}'
settings-file: '{mvn-settings}'
- - shell: !include-raw-escape: ../shell/maven-patch-release.sh
- lf-maven-versions-plugin:
maven-versions-plugin: '{maven-versions-plugin}'
mvn-version: '{mvn-version}'
mvn-pom: '{mvn-pom}'
maven-versions-plugin-set-version: '{maven-versions-plugin-set-version}'
mvn-settings: '{mvn-settings}'
- lf-maven-versions-plugin:
maven-versions-plugin: '{maven-versions-plugin}'
mvn-version: '{mvn-version}'
mvn-pom: '{mvn-pom}'
maven-versions-plugin-set-version: '{maven-versions-plugin-set-version}'
mvn-settings: '{mvn-settings}'
+ - shell: !include-raw-escape: ../shell/maven-patch-release.sh
- lf-maven-build:
mvn-goals: '{mvn-goals}'
- lf-sigul-sign-dir:
- lf-maven-build:
mvn-goals: '{mvn-goals}'
- lf-sigul-sign-dir:
--- /dev/null
+---
+fixes:
+ - |
+ Projects using maven versions plugin let this plugin take care or
+ updating their versions in the pom.xml. When maven-versions-plugin
+ is set to "true", skip the stripping of SNAPSHOTS from the pom.xml
+ files. maven-versions-plugin is set to "false" by default.
set -eu -o pipefail
echo "$PROJECT" "$(git rev-parse --verify HEAD)" | tee -a "$PATCH_DIR/taglist.log"
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"
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"