Skip to content

feat(remix): Accept org, project and url as args to upload script #8985

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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