From b7d9cfe81eb912329f7ced61f8165e7b72fc9c48 Mon Sep 17 00:00:00 2001 From: "Cezar.Leahu" Date: Mon, 28 Sep 2020 12:30:55 +0300 Subject: [PATCH] REPO-5111 Test update_downstream.sh fix [skip tests] [no release] --- scripts/travis/update_downstream.sh | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/scripts/travis/update_downstream.sh b/scripts/travis/update_downstream.sh index 8868656124..f852909fcb 100644 --- a/scripts/travis/update_downstream.sh +++ b/scripts/travis/update_downstream.sh @@ -6,20 +6,22 @@ pushd "$(dirname "${BASH_SOURCE[0]}")/../../" source "$(dirname "${BASH_SOURCE[0]}")/build_functions.sh" +#Fetch the latest changes, as Travis will only checkout the PR commit +git fetch origin "${TRAVIS_BRANCH}" +git checkout "${TRAVIS_BRANCH}" +git pull + +# Retrieve the current Community version +VERSION="$(evaluatePomProperty "project.version")" + DOWNSTREAM_REPO="github.com/Alfresco/alfresco-enterprise-repo.git" cloneRepo "${DOWNSTREAM_REPO}" "${TRAVIS_BRANCH}" cd "$(dirname "${BASH_SOURCE[0]}")/../../../$(basename "${DOWNSTREAM_REPO%.git}")" -# Update parent -mvn -B versions:update-parent versions:commit - -VERSION="$(sed -n '//,/<\/parent>/p' pom.xml \ - | sed -n '//,/<\/version>/p' \ - | tr -d '\n' \ - | grep -oP '(?<=).*(?=)' \ - | xargs)" +# Update parent version +mvn -B versions:update-parent versions:commit "-DparentVersion=[${VERSION}]" # Update dependency version mvn -B versions:set-property versions:commit \ @@ -32,8 +34,10 @@ git --no-pager diff pom.xml git add pom.xml if git status --untracked-files=no --porcelain | grep -q '^' ; then - git commit -m "Update upstream version to ${VERSION}" - git push + #todo enable this commit & push + echo "Skip for now" + #git commit -m "Update upstream version to ${VERSION}" + #git push else echo "Dependencies are already up to date." git status