Skip to content

Commit

Permalink
fix: update TRACK_EXISTS sourced file for gtmq (IN-1777) (#310)
Browse files Browse the repository at this point in the history
Co-authored-by: Greg O'Grady <[email protected]>
  • Loading branch information
theProf and Greg O'Grady authored Nov 15, 2024
1 parent b9a75a2 commit 243a0d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/scripts/track/update_track.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,16 @@ source "/tmp/IMAGE_STATUS"
# shellcheck disable=SC1091
source "/tmp/TRACK_STATUS"

IS_GTMQ=$(grep -qE "^gtmq_" - <<<"${CIRCLE_BRANCH}" && echo 1 || echo 0)
IS_GTMQ=$(grep -qE "^(gtmq_.*|trying)$" - <<<"${CIRCLE_BRANCH}" && echo 1 || echo 0)

if [[ "$TRACK_EXISTS" != "true" ]]; then
if (( ! IS_GTMQ )); then
echo "Track does not exist! avoiding update!"
exit 0
fi

echo "Track will be created for merge queue branch"
echo 'export TRACK_EXISTS="true"' > /tmp/TRACK_STATUS # Track exists, skip following steps
fi

if [[ -z "$CIRCLE_BRANCH" && -n "$CIRCLE_TAG" ]]; then
Expand Down

0 comments on commit 243a0d9

Please sign in to comment.