insomnia/scripts/sentry-release.sh

47 lines
1.3 KiB
Bash
Raw Normal View History

#!/bin/bash
#? Upload Source Maps to Sentry
APP_VERSION=$(node -e "console.log(require('./build/package.json').version)")
SENTRY_TOKEN="367a6d824c8449bfbff884f0c1bc6180"
echo "-- Creating Release $APP_VERSION --"
2016-08-17 19:12:13 +00:00
# ~~~~~~~~~~~~~~~~~~~~ #
# Create a new release #
# ~~~~~~~~~~~~~~~~~~~~ #
curl https://app.getsentry.com/api/0/projects/schierco/insomnia-electron/releases/ \
-X POST \
-u "$SENTRY_TOKEN:" \
-H 'Content-Type: application/json' \
-d "{\"version\": \"$APP_VERSION\"}"
echo ""
echo "-- Uploading Source Maps for $APP_VERSION --"
2016-08-17 19:12:13 +00:00
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# Upload files for the given release #
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
curl https://app.getsentry.com/api/0/projects/schierco/insomnia-electron/releases/${APP_VERSION}/files/ \
-X POST \
-u "$SENTRY_TOKEN:" \
-F file=@./build/bundle.js \
-F name="bundle.js"
2016-08-17 18:05:52 +00:00
curl https://app.getsentry.com/api/0/projects/schierco/insomnia-electron/releases/${APP_VERSION}/files/ \
-X POST \
-u "$SENTRY_TOKEN:" \
-F file=@./build/bundle.js \
-F name="bundle.js"
# Upload a file for the given release
curl https://app.getsentry.com/api/0/projects/schierco/insomnia-electron/releases/${APP_VERSION}/files/ \
-X POST \
-u "$SENTRY_TOKEN:" \
-F file=@./build/bundle.js.map \
-F name="bundle.js.map"
echo ""
echo "-- Done --"