X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fautorelease%2Fprepare-release.sh;h=59c0a94eeacf5b5492d44aa9994e84749d0f37c7;hb=93a5304ef04620630cbd6de14694607048bf2aa3;hp=a2b8abc3dc93694b2bb5e36cfd220a2c0acc0ef3;hpb=ff384fb543da708ed8bd98e2f800dbb7fc15ae49;p=releng%2Fbuilder.git diff --git a/jjb/autorelease/prepare-release.sh b/jjb/autorelease/prepare-release.sh index a2b8abc3d..59c0a94ee 100644 --- a/jjb/autorelease/prepare-release.sh +++ b/jjb/autorelease/prepare-release.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -l # SPDX-License-Identifier: EPL-1.0 ############################################################################## # Copyright (c) 2015, 2017 The Linux Foundation and others. @@ -39,18 +39,17 @@ git submodule foreach "echo \$path \$(git rev-parse --verify HEAD) ${RELEASE_TAG echo "$RELEASE_TAG" find . -name "*.xml" -print0 | xargs -0 sed -i 's/-SNAPSHOT//' +# Ignore changes to Final distribution since that will be released separately +pushd integration/distribution || exit 1 + git checkout -f opendaylight/pom.xml +popd || exit 1 git submodule foreach "git commit -am \"Release $RELEASE_TAG\" || true" git commit -am "Release $RELEASE_TAG" 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 pushd "$module" || exit - # 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/$GERRIT_BRANCH" > "$PATCH_DIR/${module//\//-}.patch" - fi + git format-patch --stdout "origin/$GERRIT_BRANCH" > "$PATCH_DIR/${module//\//-}.patch" git bundle create "$PATCH_DIR/${module//\//-}.bundle" "origin/master..HEAD" popd || exit done