Skip to content

Commit

Permalink
chore(ci): allow failure of commit message check and add additional d…
Browse files Browse the repository at this point in the history
…ebug info [RELEASE ONLY]
  • Loading branch information
matejkriz committed Aug 4, 2023
1 parent 50cdcb4 commit c6b9160
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions ci/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ release commit messages:
- codesign
script:
- ci/scripts/check_release_commit_messages.sh
allow_failure: true

# Messaging system deploy to production
msg-system codesign deploy:
Expand Down
5 changes: 5 additions & 0 deletions ci/scripts/check_release_commit_messages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,22 @@ do
# 1. "cherry picked from ([some commit in develop])"
# shellcheck disable=SC2076
if [[ $message =~ "(cherry picked from commit" ]]; then
echo "$commit contains cherry pick message"

# remove last ")" and extract commit hash
develop_commit=$(echo "$message" | tr ' ' '\n' | tail -1 | sed 's/)$//')
# check if develop really contains this commit hash
if [[ $(git branch -a --contains "$develop_commit" | grep --only-matching "remotes/origin/develop") == "remotes/origin/develop" ]]; then
echo "$commit reference $develop_commit commit from develop"
continue
fi
echo "$develop_commit not found in develop"
fi

# 2. [RELEASE ONLY] substring
# shellcheck disable=SC2076
if [[ $message =~ "[RELEASE ONLY]" ]]; then
echo "$commit contains RELEASE ONLY message"
continue
fi

Expand Down

0 comments on commit c6b9160

Please sign in to comment.