From 9a0795994e9150a127091f2c27d16b2fce372f3d Mon Sep 17 00:00:00 2001 From: Leonid Plyushch Date: Mon, 6 May 2019 15:49:59 +0300 Subject: [PATCH] CI: look only for tags specified in commit message Because for pull requests environment variable CIRRUS_CHANGE_MESSAGE contains only their description. %ci:reset-backlog --- .cirrus.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 04902c162..6de4969ca 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -29,7 +29,7 @@ build_task: # Determine changes in repository and build modified packages. build_script: | - if grep -qiP '^\s*%ci:reset-backlog\s*$' <(echo "$CIRRUS_CHANGE_MESSAGE"); then + if grep -qiP '^\s*%ci:reset-backlog\s*$' <(git log --format="%B" -n 1 "$CIRRUS_CHANGE_IN_REPO"); then # If commit message contains line '%ci:reset-backlog', no builds # should be done and CI should stop with "green" status. MODIFIED_PACKAGES="" @@ -71,7 +71,7 @@ publish_task: # Publish. upload_to_bintray_script: | - if grep -qiP '^\s*%ci:reset-backlog\s*$' <(echo "$CIRRUS_CHANGE_MESSAGE"); then + if grep -qiP '^\s*%ci:reset-backlog\s*$' <(git log --format="%B" -n 1 "$CIRRUS_CHANGE_IN_REPO"); then MODIFIED_PACKAGES="" else MODIFIED_PACKAGES=$(./scripts/build/ci/determine_git_changes.sh)