Skip to content

Instantly share code, notes, and snippets.

@danharper danharper/release.js
Last active Oct 31, 2016

What would you like to do?
const { execSync } = require('child_process')
const SENTRY_URL = ''
const SENTRY_API_KEY = process.env.SENTRY_API_KEY
const VERSION = process.env.CIRCLE_SHA1
function createSentryRelease() {
execSync(`curl ${SENTRY_URL} -u ${SENTRY_API_KEY} -X POST -d '${JSON.stringify({ version: VERSION })}' -H 'Content-Type: application-json'`)
function uploadToSentry(file, filename) {
execSync(`curl ${SENTRY_URL}/${VERSION}/files/ -u ${SENTRY_API_KEY} -X POST -F file=@${file} -F name='${filename}'`)
uploadToSentry('build/app.js', 'app.js')
uploadToSentry('build/', '')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.