Excavator: Render CircleCI file using template specified in .circleci/template.sh (#483)
This commit is contained in:
parent
126cbea108
commit
eb0f10f79b
1 changed files with 8 additions and 0 deletions
|
@ -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" }}' }
|
||||
|
|
Loading…
Reference in a new issue