From 949a7cc024676994a87584deb045aaac32bcea73 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Thu, 3 Dec 2015 20:10:53 -0500 Subject: [PATCH] Fix patch generation script to work with sub-projects Sub-projects such as integration/distribution break the patch generation script due to the script assuming all paths are relative to the same root. Change-Id: Ia989b9b6d231584011fd0240f1c3ea17f801e8e8 Signed-off-by: Thanh Ha --- .../include-raw-autorelease-release-versions.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/jjb/autorelease/include-raw-autorelease-release-versions.sh b/jjb/autorelease/include-raw-autorelease-release-versions.sh index bbf90e2261..99c40872a5 100644 --- a/jjb/autorelease/include-raw-autorelease-release-versions.sh +++ b/jjb/autorelease/include-raw-autorelease-release-versions.sh @@ -13,6 +13,9 @@ # RELEASE_TAG=Helium-SR2 # Example # RELEASE_BRANCH=stable/helium # Example +# Directory to put git format-patches +PATCH_DIR=`pwd`/patches + if [ "$DATESTAMP" == "true" ]; then export RELEASE_TAG=$RELEASE_TAG-`date -u +v%Y%m%d%H%M` fi @@ -25,9 +28,9 @@ git commit -am "Release $RELEASE_TAG" mkdir patches modules=`xmlstarlet sel -N x=http://maven.apache.org/POM/4.0.0 -t -m '//x:modules' -v '//x:module' pom.xml` for module in $modules; do - cd $module - git format-patch --stdout origin/$RELEASE_BRANCH > ../patches/$module.patch - cd .. + pushd $module + git format-patch --stdout origin/$RELEASE_BRANCH > $PATCH_DIR/${module//\//-}.patch + popd done ./scripts/fix-relativepaths.sh -- 2.36.6