forked from sentry-demos/tracing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release-config.sh
executable file
·36 lines (29 loc) · 955 Bytes
/
release-config.sh
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
day=$(date +%d)
month=$(date +%-m)
if [ "$day" -ge 0 ] && [ "$day" -le 7 ]; then
echo ">=0<=7"
week=1
elif [ "$day" -ge 8 ] && [ "$day" -le 14 ]; then
echo ">=8<=14"
week=2
elif [ "$day" -ge 15 ] && [ "$day" -le 21 ]; then
echo ">=15<=21"
week=3
elif [ "$day" -ge 22 ]; then
echo ">=22"
week=4
fi
RELEASE="$month.$week"
echo $release
# SENTRY_AUTH_TOKEN defined in shell profile
SENTRY_PROJECT1=da-react
SENTRY_PROJECT2=da-flask
SENTRY_ORG=testorg-az
PREFIX=static/js
sentry-cli releases -o $SENTRY_ORG new -p $SENTRY_PROJECT1 $RELEASE
sentry-cli releases -o $SENTRY_ORG new -p $SENTRY_PROJECT2 $RELEASE
sentry-cli releases -o $SENTRY_ORG -p $SENTRY_PROJECT1 set-commits --auto $RELEASE
sentry-cli releases -o $SENTRY_ORG -p $SENTRY_PROJECT2 set-commits --auto $RELEASE
sentry-cli releases -o $SENTRY_ORG -p $SENTRY_PROJECT1 files $RELEASE \
upload-sourcemaps --url-prefix "~/$PREFIX" --validate react/build/$PREFIX
echo 'DONE'