Excavator: Render CircleCI file using template specified in .circleci/template.sh (#483)

This commit is contained in:
Excavator Bot 2022-06-20 16:22:02 +01:00 committed by GitHub
parent 126cbea108
commit eb0f10f79b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,20 +19,24 @@ jobs:
name: delete_unrelated_tags
command: |
ALL_TAGS=$(git tag --points-at HEAD)
if [ -z "$ALL_TAGS" ]; then
echo "No-op as there are no tags on the current commit ($(git rev-parse HEAD))"
exit 0
fi
if [ -z "${CIRCLE_TAG:+x}" ]; then
echo "Non-tag build, deleting all tags which point to HEAD: [${ALL_TAGS/$'\n'/,}]"
echo "$ALL_TAGS" | while read -r TAG; do git tag -d "$TAG" 1>/dev/null; done
exit 0
fi
TAGS_TO_DELETE=$(echo "$ALL_TAGS" | grep -v "^$CIRCLE_TAG$" || :)
if [ -z "$TAGS_TO_DELETE" ]; then
echo "No-op as exactly one tag ($CIRCLE_TAG) points to HEAD"
exit 0
fi
echo "Detected tag build, deleting all tags except '$CIRCLE_TAG' which point to HEAD: [${TAGS_TO_DELETE/$'\n'/,}]"
echo "$TAGS_TO_DELETE" | while read -r TAG; do git tag -d "$TAG" 1>/dev/null; done
- restore_cache: { key: 'gradle-wrapper-v1-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}' }
@ -67,20 +71,24 @@ jobs:
name: delete_unrelated_tags
command: |
ALL_TAGS=$(git tag --points-at HEAD)
if [ -z "$ALL_TAGS" ]; then
echo "No-op as there are no tags on the current commit ($(git rev-parse HEAD))"
exit 0
fi
if [ -z "${CIRCLE_TAG:+x}" ]; then
echo "Non-tag build, deleting all tags which point to HEAD: [${ALL_TAGS/$'\n'/,}]"
echo "$ALL_TAGS" | while read -r TAG; do git tag -d "$TAG" 1>/dev/null; done
exit 0
fi
TAGS_TO_DELETE=$(echo "$ALL_TAGS" | grep -v "^$CIRCLE_TAG$" || :)
if [ -z "$TAGS_TO_DELETE" ]; then
echo "No-op as exactly one tag ($CIRCLE_TAG) points to HEAD"
exit 0
fi
echo "Detected tag build, deleting all tags except '$CIRCLE_TAG' which point to HEAD: [${TAGS_TO_DELETE/$'\n'/,}]"
echo "$TAGS_TO_DELETE" | while read -r TAG; do git tag -d "$TAG" 1>/dev/null; done
- restore_cache: { key: 'gradle-wrapper-v1-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}' }