mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
ACS-550 Test downstream repo update [skip tests] [no-release]
This commit is contained in:
42
scripts/travis/update_downstream.sh
Normal file
42
scripts/travis/update_downstream.sh
Normal file
@@ -0,0 +1,42 @@
|
||||
#!/usr/bin/env bash
|
||||
echo "=========================== Starting Update Downstream Script ==========================="
|
||||
PS4="\[\e[35m\]+ \[\e[m\]"
|
||||
set -vex
|
||||
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
|
||||
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/build_functions.sh"
|
||||
|
||||
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 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 dependency version
|
||||
mvn versions:set-property versions:commit \
|
||||
-Dproperty=dependency.alfresco-community-repo.version \
|
||||
"-DnewVersion=${VERSION}"
|
||||
|
||||
# Commit changes
|
||||
git status
|
||||
git --no-pager diff pom.xml
|
||||
git add pom.xml
|
||||
git commit -m "Update upstream version to ${VERSION}"
|
||||
#todo enable this
|
||||
#git push
|
||||
git status
|
||||
|
||||
|
||||
popd
|
||||
set +vex
|
||||
echo "=========================== Finishing Update Downstream Script =========================="
|
||||
|
Reference in New Issue
Block a user