Revert "Revert "ACS-2608 Support force directive. (#992)""

This reverts commit 464db778fa.
This commit is contained in:
Tom Page
2022-03-22 10:45:16 +00:00
parent 464db778fa
commit d0452aaddb
2 changed files with 6 additions and 2 deletions

View File

@@ -33,7 +33,11 @@ git status
git --no-pager diff pom.xml
git add pom.xml
if git status --untracked-files=no --porcelain | grep -q '^' ; then
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