Skip to content

Commit

Permalink
Fix sentry and custom version scripts (#4510)
Browse files Browse the repository at this point in the history
* Sentry scripts

* Sentry scripts

* Sentry scripts

* Sentry scripts

* Sentry scripts

* Sentry scripts

* Sentry scripts

* Sentry scripts

* Sentry scripts

* Sentry scripts

* Sentry scripts

* Sentry scripts
  • Loading branch information
andrzejewsky authored Dec 1, 2023
1 parent bf352cf commit 3086f43
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/curvy-houses-nail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": patch
---

Fix sentry upload and custom version scripts
5 changes: 3 additions & 2 deletions .github/workflows/deploy-cloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/deploy-master-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/deploy-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions scripts/sentry-upload.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

if [[ -z "${SENTRY_ORG}" ]]; then
echo "Sentry not definied. Skipping uploading..."
else
Expand Down

0 comments on commit 3086f43

Please sign in to comment.