Skip to content

Commit 48fb533

Browse files
authored
👷 Fix CI build (#105)
2 parents 96d0019 + 010b767 commit 48fb533

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

‎.circleci/config.yml‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,23 @@ jobs:
183183
184184
ls -1 /tmp/repo/versions > /tmp/repo/versions.txt
185185
186+
COMMIT_MESSAGE=$(git show-branch --no-name origin/${CIRCLE_BRANCH})
187+
GITMOJI=$(echo $COMMIT_MESSAGE | awk -F ':' '{print $2}')
188+
if [ "$GITMOJI" ]
189+
then
190+
GITMOJI_CODEPOINT=$( \
191+
curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/emojis | \
192+
jq -r ".${GITMOJI}" | \
193+
awk -F 'https://github.githubassets.com/images/icons/emoji/unicode/|.png.*' '{print $2}' \
194+
)
195+
if [ "$GITMOJI_CODEPOINT" ]
196+
then
197+
GITMOJI_UNICODE="$(echo -e \\u$GITMOJI_CODEPOINT) "
198+
COMMIT_MESSAGE="${GITMOJI_UNICODE}${COMMIT_MESSAGE/\:$GITMOJI\:}"
199+
fi
200+
fi
186201
git add .
187-
git commit -m $(git show-branch --no-name origin/${CIRCLE_BRANCH}) || true
202+
git commit -m "${COMMIT_MESSAGE}" || true
188203
git push -f origin gh-pages || true
189204
190205
workflows:

0 commit comments

Comments
 (0)