2016-07-25 22:27:29 +00:00
|
|
|
#!/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 #
|
|
|
|
# ~~~~~~~~~~~~~~~~~~~~ #
|
|
|
|
|
2016-10-27 03:41:30 +00:00
|
|
|
curl https://app.getsentry.com/api/0/projects/schierco/insomnia-app/releases/ \
|
2016-07-25 22:27:29 +00:00
|
|
|
-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 #
|
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
|
|
|
|
|
2016-10-27 03:41:30 +00:00
|
|
|
curl https://app.getsentry.com/api/0/projects/schierco/insomnia-app/releases/${APP_VERSION}/files/ \
|
2016-08-17 19:12:13 +00:00
|
|
|
-X POST \
|
|
|
|
-u "$SENTRY_TOKEN:" \
|
|
|
|
-F file=@./build/bundle.js \
|
|
|
|
-F name="bundle.js"
|
|
|
|
|
2016-10-27 03:41:30 +00:00
|
|
|
curl https://app.getsentry.com/api/0/projects/schierco/insomnia-app/releases/${APP_VERSION}/files/ \
|
2016-08-17 18:05:52 +00:00
|
|
|
-X POST \
|
|
|
|
-u "$SENTRY_TOKEN:" \
|
|
|
|
-F file=@./build/bundle.js \
|
|
|
|
-F name="bundle.js"
|
|
|
|
|
2016-07-25 22:27:29 +00:00
|
|
|
# Upload a file for the given release
|
2016-10-27 03:41:30 +00:00
|
|
|
curl https://app.getsentry.com/api/0/projects/schierco/insomnia-app/releases/${APP_VERSION}/files/ \
|
2016-07-25 22:27:29 +00:00
|
|
|
-X POST \
|
|
|
|
-u "$SENTRY_TOKEN:" \
|
|
|
|
-F file=@./build/bundle.js.map \
|
|
|
|
-F name="bundle.js.map"
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "-- Done --"
|