forked from warpdotdev/warp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsentry_create_release.sh
More file actions
executable file
·40 lines (34 loc) · 1.36 KB
/
Copy pathsentry_create_release.sh
File metadata and controls
executable file
·40 lines (34 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
# These env vars must be set:
# SENTRY_PROJECT
# SENTRY_AUTH_TOKEN
# SENTRY_ORG
# SENTRY_ENVIRONMENT
# RELEASE_VERSION
# This script is adapted from getsentry/action-release, a JS GitHub Action. See
# the relevant source code here: https://github.com/getsentry/action-release/blob/master/src/main.ts.
if which sentry-cli >/dev/null; then
# Create the new release.
ERROR=$(sentry-cli releases new "$RELEASE_VERSION")
if [ $? -ne 0 ]; then
echo "::error title=Error creating Sentry release::$ERROR"
fi
# Set the commits for the release automatically.
ERROR=$(sentry-cli releases set-commits --auto "$RELEASE_VERSION")
if [ $? -ne 0 ]; then
echo "::error title=Error setting commits for Sentry release::$ERROR"
fi
# Add a deploy for the release.
ERROR=$(sentry-cli deploys new --release "$RELEASE_VERSION" --env "$SENTRY_ENVIRONMENT")
if [ $? -ne 0 ]; then
echo "::error title=Error adding deploy for Sentry release::$ERROR"
fi
# Finalize the release.
ERROR=$(sentry-cli releases finalize "$RELEASE_VERSION")
if [ $? -ne 0 ]; then
echo "::error title=Error finalizing Sentry release::$ERROR"
fi
else
NOT_INSTALLED="sentry-cli not installed, download from https://github.com/getsentry/sentry-cli/releases"
echo "::error title=Error creating Sentry release::$NOT_INSTALLED"
fi