Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compare against both base-version and base@version #12433

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the deleted whitespace is result of shell-format run

pkg=$(basename $d)

PKG_VERSION=$(jq -r .version pkg/${pkg}/package.json)
PKG_VERSION=$(jq -r .version pkg/${pkg}/package.json) || exit 1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chatgpt suggested that change to verify that jq returns something

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
Loading