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"
|
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"
|
DOWNSTREAM_REPO="github.com/Alfresco/alfresco-enterprise-repo.git"
|
||||||
|
|
||||||
cloneRepo "${DOWNSTREAM_REPO}" "${TRAVIS_BRANCH}"
|
cloneRepo "${DOWNSTREAM_REPO}" "${TRAVIS_BRANCH}"
|
||||||
|
|
||||||
cd "$(dirname "${BASH_SOURCE[0]}")/../../../$(basename "${DOWNSTREAM_REPO%.git}")"
|
cd "$(dirname "${BASH_SOURCE[0]}")/../../../$(basename "${DOWNSTREAM_REPO%.git}")"
|
||||||
|
|
||||||
# Update parent
|
# Update parent version
|
||||||
mvn -B versions:update-parent versions:commit
|
mvn -B versions:update-parent versions:commit "-DparentVersion=[${VERSION}]"
|
||||||
|
|
||||||
VERSION="$(sed -n '/<parent>/,/<\/parent>/p' pom.xml \
|
|
||||||
| sed -n '/<version>/,/<\/version>/p' \
|
|
||||||
| tr -d '\n' \
|
|
||||||
| grep -oP '(?<=<version>).*(?=</version>)' \
|
|
||||||
| xargs)"
|
|
||||||
|
|
||||||
# Update dependency version
|
# Update dependency version
|
||||||
mvn -B versions:set-property versions:commit \
|
mvn -B versions:set-property versions:commit \
|
||||||
@@ -32,8 +34,10 @@ git --no-pager diff pom.xml
|
|||||||
git add pom.xml
|
git add pom.xml
|
||||||
|
|
||||||
if git status --untracked-files=no --porcelain | grep -q '^' ; then
|
if git status --untracked-files=no --porcelain | grep -q '^' ; then
|
||||||
git commit -m "Update upstream version to ${VERSION}"
|
#todo enable this commit & push
|
||||||
git push
|
echo "Skip for now"
|
||||||
|
#git commit -m "Update upstream version to ${VERSION}"
|
||||||
|
#git push
|
||||||
else
|
else
|
||||||
echo "Dependencies are already up to date."
|
echo "Dependencies are already up to date."
|
||||||
git status
|
git status
|
||||||
|
Reference in New Issue
Block a user