ACS-2608 Support force directive.

This commit is contained in:
Tom Page
2022-03-02 09:01:40 +00:00
parent bfda737651
commit 6ae9f88bb5
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
forceToken=$(echo "${TRAVIS_COMMIT_MESSAGE}" | sed "s|^.*\(\[force[^]]*\]\).*$|\1|g")
git commit --allow-empty -m "${forceToken} 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