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

@@ -32,7 +32,7 @@ env:
stages: stages:
- name: test - name: test
if: commit_message !~ /\[skip tests\]/ if: commit_message !~ /\[skip tests\]/ AND commit_message !~ /\[force[^\]]*\]/
- name: release - name: release
if: commit_message !~ /\[no release\]/ AND (branch = master OR branch =~ /release\/.*/) AND type != pull_request AND fork = false if: commit_message !~ /\[no release\]/ AND (branch = master OR branch =~ /release\/.*/) AND type != pull_request AND fork = false
- name: update_downstream - name: update_downstream

View File

@@ -33,7 +33,11 @@ git status
git --no-pager diff pom.xml 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 [[ "${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 commit -m "Update upstream version to ${VERSION}"
git push git push
else else