From 2aa47f9fdf1f61f47bbdba61177c1e9bcd425724 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Wed, 8 Jun 2016 17:22:33 -0400 Subject: [PATCH] Fix taglist script to include subprojects For example integration/distribution was not being processed in the tag script. Change-Id: I9c989936f4421562245a61e57cfafcd5eb297f9b Signed-off-by: Thanh Ha --- patch-odl-release.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/patch-odl-release.sh b/patch-odl-release.sh index f1115661..7edf9cb6 100755 --- a/patch-odl-release.sh +++ b/patch-odl-release.sh @@ -39,7 +39,13 @@ scriptdir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) # built the release. Basically ensuring that no new patches snuck into the # project during code freeze. CURRENT_HASH=`git rev-parse HEAD` -EXPECTED_HASH=`grep "$project[[:space:]]" $PATCH_DIR/taglist.log | awk '{ print $2 }'` +EXPECTED_HASH=`grep "^${project} " $PATCH_DIR/taglist.log | awk '{ print $2 }'` +if [ "$EXPECTED_HASH" == "" ]; then + parent_dir="$(dirname `pwd`)" + project="${parent_dir##*/}/$project" + EXPECTED_HASH=`grep "^${project} " $PATCH_DIR/taglist.log | awk '{ print $2 }'` +fi + echo "Current Hash: $CURRENT_HASH" echo "Expected Hash: $EXPECTED_HASH" if [ "$CURRENT_HASH" != "$EXPECTED_HASH" ] @@ -51,12 +57,10 @@ fi ####################### # Start apply patches # ####################### - -git apply ${PATCH_DIR}/${project}.patch +git apply ${PATCH_DIR}/${project/\//-}.patch git commit -asm "Release $RELEASE_TAG" git tag -asm "OpenDaylight $RELEASE_TAG release" release/${RELEASE_TAG,,} find . -name pom.xml | xargs grep SNAPSHOT $scriptdir/version.sh bump $RELEASE_TAG git commit -asm "Bumping versions by 0.0.1 for next dev cycle" find . -name pom.xml | xargs grep $RELEASE_TAG - -- 2.16.6