generated from vis4rd/opengl_project_template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔨 Move gitmoji check heavy-lifting from CI workflow to bash script
- Loading branch information
Showing
2 changed files
with
26 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
# Usage: ./ensure_all_commits_start_with_gitmoji.sh <commit_messages_file> <gitmoji_list_file> | ||
# Working directory should be the root of the repository. | ||
|
||
commit_messages_file=$1 | ||
gitmoji_list_file=$2 | ||
|
||
# Check each commit message | ||
is_ok=true | ||
while IFS= read -r commit; do | ||
.scripts/ensure_commit_starts_with_gitmoji.sh "$commit" "$gitmoji_list_file" | ||
if [[ $? -eq 1 ]]; then | ||
is_ok=false | ||
break | ||
fi | ||
done < "$commit_messages_file" | ||
|
||
if [[ $is_ok == false ]]; then | ||
echo "Commit message does not start with a Gitmoji: '$commit'" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters