Last active
March 19, 2019 01:07
-
-
Save tibotiber/3427f10df699678839c8c5a6615e96ed to your computer and use it in GitHub Desktop.
Medium: Deploy private source maps with Netlify
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ... build and push to gcloud ... # | |
# install sentry cli | |
echo "Installing and configuring sentry cli" | |
curl -L -o sentry-cli https://github.com/getsentry/sentry-cli/releases/download/1.40.0/sentry-cli-Linux-x86_64 | |
chmod u+x sentry-cli | |
./sentry-cli --version | |
export SENTRY_ORG=<sentry-org> | |
export SENTRY_PROJECT=<sentry-project> | |
# create sentry release and upload source maps | |
echo "Creating release" | |
./sentry-cli releases new ${COMMIT_REF::7} | |
echo "Setting release commits" | |
./sentry-cli releases set-commits --commit "<github-org>/<github-repo>@$COMMIT_REF" ${COMMIT_REF::7} | |
echo "Link deploy to release" | |
./sentry-cli releases deploys ${COMMIT_REF::7} new -e $SENTRY_ENV | |
echo "Uploading source maps" | |
./sentry-cli releases files ${COMMIT_REF::7} upload-sourcemaps build/static/js/ --rewrite --url-prefix '~/static/js' | |
echo "Finalizing release" | |
./sentry-cli releases finalize ${COMMIT_REF::7} | |
# ... delete source maps ... # |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment