mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
REPO-5111 Test update_downstream.sh fix [skip tests] [no release]
This commit is contained in:
@@ -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>/,/<\/parent>/p' pom.xml \
|
||||
| sed -n '/<version>/,/<\/version>/p' \
|
||||
| tr -d '\n' \
|
||||
| grep -oP '(?<=<version>).*(?=</version>)' \
|
||||
| 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
|
||||
|
Reference in New Issue
Block a user