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