diff --git a/.changeset/curvy-houses-nail.md b/.changeset/curvy-houses-nail.md new file mode 100644 index 00000000000..46c7a51ac36 --- /dev/null +++ b/.changeset/curvy-houses-nail.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": patch +--- + +Fix sentry upload and custom version scripts diff --git a/.github/workflows/deploy-cloud.yaml b/.github/workflows/deploy-cloud.yaml index 3249d253c90..f507770adc0 100644 --- a/.github/workflows/deploy-cloud.yaml +++ b/.github/workflows/deploy-cloud.yaml @@ -34,8 +34,9 @@ jobs: - name: Set sentry release run: | HASH=$(git rev-parse --short HEAD) - VERSION=$(jq -r .version package.json) - echo "SENTRY_RELEASE=${VERSION}-${HASH}" >> $GITHUB_ENV + CURRENT_VERSION=$(jq -r .version package.json) + RELEASE="${CURRENT_VERSION}-${HASH}" + echo "SENTRY_RELEASE=${RELEASE}" >> $GITHUB_ENV - name: Package timeout-minutes: 15 run: | diff --git a/.github/workflows/deploy-master-staging.yaml b/.github/workflows/deploy-master-staging.yaml index 288f18bba1d..b87c9b430db 100644 --- a/.github/workflows/deploy-master-staging.yaml +++ b/.github/workflows/deploy-master-staging.yaml @@ -25,8 +25,9 @@ jobs: run: | HASH=$(git rev-parse --short HEAD) CURRENT_VERSION=$(jq -r .version package.json) - echo "CUSTOM_VERSION=${CURRENT_VERSION}-${HASH}" >> $GITHUB_ENV - echo "SENTRY_RELEASE=$CUSTOM_VERSION" >> $GITHUB_ENV + RELEASE="${CURRENT_VERSION}-${HASH}" + echo "CUSTOM_VERSION=${RELEASE}" >> $GITHUB_ENV + echo "SENTRY_RELEASE=${RELEASE}" >> $GITHUB_ENV - name: Setup Node uses: actions/setup-node@v3 with: diff --git a/.github/workflows/deploy-staging.yaml b/.github/workflows/deploy-staging.yaml index 0bbde91cb05..2fbc2e43472 100644 --- a/.github/workflows/deploy-staging.yaml +++ b/.github/workflows/deploy-staging.yaml @@ -50,9 +50,12 @@ jobs: # Add commit hash to basic version number run: | set -x - hash=$(git rev-parse --short HEAD) - echo "CUSTOM_VERSION=${VERSION}-${hash}" >> $GITHUB_ENV - echo "SENTRY_RELEASE=$CUSTOM_VERSION" >> $GITHUB_ENV + HASH=$(git rev-parse --short HEAD) + CURRENT_VERSION=$(jq -r .version package.json) + RELEASE="${CURRENT_VERSION}-${HASH}" + echo "CUSTOM_VERSION=${RELEASE}" >> $GITHUB_ENV + echo "SENTRY_RELEASE=${RELEASE}" >> $GITHUB_ENV + - name: Setup Node uses: actions/setup-node@v3 with: diff --git a/scripts/sentry-upload.sh b/scripts/sentry-upload.sh index 3c6bf4252d5..cd58ec35fb1 100755 --- a/scripts/sentry-upload.sh +++ b/scripts/sentry-upload.sh @@ -1,3 +1,5 @@ +#!/bin/bash + if [[ -z "${SENTRY_ORG}" ]]; then echo "Sentry not definied. Skipping uploading..." else