mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
* ACS-2608 Support force directive. * ACS-2608 Rename bash variable to match convention. * ACS-2608 Use 14.121.x for branch. * [force 7.2.0-A27.1] ACS-2608 Test force release. * [force 7.2.0-A27.1] ACS-2608 Fix regex for force. * [maven-release-plugin][skip ci] prepare release 14.121.1 * [maven-release-plugin][skip ci] prepare for next development iteration * [force 7.2.0-A27.2] ACS-2608 Test force release. * [maven-release-plugin][skip ci] prepare release 14.121.2 * [maven-release-plugin][skip ci] prepare for next development iteration * [force 7.2.0-A27.3] ACS-2608 Test force release. * [maven-release-plugin][skip ci] prepare release 14.121.3 * [maven-release-plugin][skip ci] prepare for next development iteration * [force 7.2.0-A27.4] ACS-2608 Test force release. * [maven-release-plugin][skip ci] prepare release 14.121.4 * [maven-release-plugin][skip ci] prepare for next development iteration * ACS-2608 Revert change to version. Co-authored-by: Travis CI User <build@alfresco.com>
53 lines
1.6 KiB
Bash
53 lines
1.6 KiB
Bash
#!/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"
|
|
|
|
#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 - latest tag on the current branch
|
|
VERSION="$(git describe --abbrev=0 --tags)"
|
|
|
|
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 version
|
|
mvn -B versions:update-parent versions:commit "-DparentVersion=[${VERSION}]"
|
|
|
|
# Update dependency version
|
|
mvn -B 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
|
|
|
|
if [[ "${TRAVIS_COMMIT_MESSAGE}" =~ \[force[^\]]*\] ]]; then
|
|
FORCE_TOKEN=$(echo "${TRAVIS_COMMIT_MESSAGE}" | sed "s|^.*\(\[force[^]]*\]\).*$|\1|g")
|
|
git commit --allow-empty -m "${FORCE_TOKEN} Update upstream version to ${VERSION}"
|
|
git push
|
|
elif git status --untracked-files=no --porcelain | grep -q '^' ; then
|
|
git commit -m "Update upstream version to ${VERSION}"
|
|
git push
|
|
else
|
|
echo "Dependencies are already up to date."
|
|
git status
|
|
fi
|
|
|
|
|
|
popd
|
|
set +vex
|
|
echo "=========================== Finishing Update Downstream Script =========================="
|
|
|