Merge "Handle yangtools nitrogen non-standard branch"
authorThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 15 Aug 2017 01:46:34 +0000 (01:46 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Tue, 15 Aug 2017 01:46:34 +0000 (01:46 +0000)
jjb/autorelease/version-bump.sh

index 2c09204f788c790d53d8a456746d07c2d15c2b2c..cb1bd87b391d7e7e15acff40cf5320c728ff5508 100644 (file)
@@ -48,7 +48,12 @@ mkdir -p "$patch_dir"
 for module in $(git submodule | awk '{ print $2 }')
 do
     pushd "$module"
-    git format-patch --stdout "origin/${BRANCH,,}" > "$patch_dir/${module//\//-}.patch"
+    # TODO: Remove once stable/nitrogen is no longer supported.
+    if [ "$GERRIT_BRANCH" == "stable/nitrogen" ] && [ "$module" == "yangtools" ]; then
+        git format-patch --stdout "origin/v1.2.x" > "$patch_dir/${module//\//-}.patch"
+    else
+        git format-patch --stdout "origin/${BRANCH,,}" > "$patch_dir/${module//\//-}.patch"
+    fi
     git bundle create "$patch_dir/${module//\//-}.bundle" "origin/${BRANCH,,}..HEAD"
     popd
 done