Skip to content

Commit

Permalink
feat(remix): Accept org, project and url as args to upload script
Browse files Browse the repository at this point in the history
  • Loading branch information
onurtemizkan committed Sep 8, 2023
1 parent cf75ffe commit 49fe889
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export SENTRY_ORG=${E2E_TEST_SENTRY_ORG_SLUG}
export SENTRY_PROJECT=${E2E_TEST_SENTRY_TEST_PROJECT}
export SENTRY_AUTH_TOKEN=${E2E_TEST_AUTH_TOKEN}

sentry-upload-sourcemaps
sentry-upload-sourcemaps --org ${E2E_TEST_SENTRY_ORG_SLUG} --project ${E2E_TEST_SENTRY_TEST_PROJECT}
8 changes: 6 additions & 2 deletions packages/remix/scripts/createRelease.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ const SentryCli = require('@sentry/cli');

const { deleteSourcemaps } = require('./deleteSourcemaps');

const sentry = new SentryCli();

async function createRelease(argv, URL_PREFIX, BUILD_PATH) {
const sentry = new SentryCli(null, {
url: argv.url,
org: argv.org,
project: argv.project,
});

let release;

if (!argv.release) {
Expand Down
15 changes: 15 additions & 0 deletions packages/remix/scripts/sentry-upload-sourcemaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ const argv = yargs(process.argv.slice(2))
"If not provided, a new release id will be determined by Sentry CLI's `propose-version`.\n" +
'See: https://docs.sentry.io/product/releases/suspect-commits/#using-the-cli\n',
})
.option('org', {
type: 'string',
describe: 'The Sentry organization slug',
})
.option('project', {
type: 'string',
describe: 'The Sentry project slug',
})
.option('url', {
type: 'string',
describe: 'The Sentry server URL',
})
.option('urlPrefix', {
type: 'string',
describe: 'URL prefix to add to the beginning of all filenames',
Expand All @@ -38,6 +50,9 @@ const argv = yargs(process.argv.slice(2))
.usage(
'Usage: $0\n' +
' [--release RELEASE]\n' +
' [--org ORG]\n' +
' [--project PROJECT]\n' +
' [--url URL]\n' +
' [--urlPrefix URL_PREFIX]\n' +
' [--buildPath BUILD_PATH]\n\n' +
' [--disableDebugIds true|false]\n\n' +
Expand Down

0 comments on commit 49fe889

Please sign in to comment.