Skip to content

Commit

Permalink
Compare against both base-version and base@version
Browse files Browse the repository at this point in the history
  • Loading branch information
owanturist authored Oct 30, 2024
1 parent e2731eb commit 430e154
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions shell/scripts/extension/parse-tag-name
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ GITHUB_WORKFLOW_TYPE=$3

# Ensure "catalog" workflow release tag name does not match a pkg/<pkg-name>
if [[ "${GITHUB_WORKFLOW_TYPE}" == "catalog" ]]; then
for d in pkg/*/ ; do
for d in pkg/*/; do
pkg=$(basename $d)

PKG_VERSION=$(jq -r .version pkg/${pkg}/package.json)
PKG_VERSION=$(jq -r .version pkg/${pkg}/package.json) || exit 1
PKG_NAME="${pkg}-${PKG_VERSION}"

if [[ "${GITHUB_RELEASE_TAG}" == "${PKG_NAME}" ]]; then
Expand All @@ -23,7 +23,8 @@ else
BASE_EXT=$(jq -r .name package.json)
EXT_VERSION=$(jq -r .version package.json)

if [[ "${GITHUB_RELEASE_TAG}" == "${BASE_EXT}-${EXT_VERSION}" ]]; then
if [[ "${GITHUB_RELEASE_TAG}" == "${BASE_EXT}-${EXT_VERSION}" ||
"${GITHUB_RELEASE_TAG}" == "${BASE_EXT}@${EXT_VERSION}" ]]; then
echo -e "tag: ${GITHUB_RELEASE_TAG}"
gh run cancel ${GITHUB_RUN_ID}
fi
Expand Down

0 comments on commit 430e154

Please sign in to comment.