Skip to content

Commit

Permalink
Change the sentryCliExec signature
Browse files Browse the repository at this point in the history
  • Loading branch information
sinankeskin committed May 27, 2020
1 parent 26b5f5e commit 7c0a4cc
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ module.exports = {
const assetsDir = this.readConfig('assetsDir');

this.log('SENTRY: Creating release...');
this.sentryCliExec(`new ${releaseName}`);
this.sentryCliExec('releases', `new ${releaseName}`);

this.log('SENTRY: Assigning commits...');
this.sentryCliExec(`set-commits --auto ${releaseName}`);
this.sentryCliExec('releases', `set-commits --auto ${releaseName}`);

this.log('SENTRY: Uploading source maps...');
this.sentryCliExec(`files ${releaseName} upload-sourcemaps --rewrite ${assetsDir}`);
this.sentryCliExec('releases', `files ${releaseName} upload-sourcemaps --rewrite ${assetsDir}`);

this.log('SENTRY: Finalizing release...');
this.sentryCliExec(`finalize ${releaseName}`);
this.sentryCliExec('releases', `finalize ${releaseName}`);

this.log('SENTRY: Release published!...');
},
Expand All @@ -55,7 +55,7 @@ module.exports = {
const environment = this.readConfig('environment');

this.log('SENTRY: Deploying release...');
this.sentryCliExec(`deploys ${releaseName} new -e ${environment}`);
this.sentryCliExec('releases', `deploys ${releaseName} new -e ${environment}`);
this.log('SENTRY: Deployed!');
},

Expand All @@ -64,11 +64,11 @@ module.exports = {
const releaseName = `${appName}@${this.readConfig('revisionKey')}`;

this.log('SENTRY: Deleting release...');
this.sentryCliExec(`delete ${releaseName}`);
this.sentryCliExec('releases', `delete ${releaseName}`);
this.log('SENTRY: Release deleted!');
},

sentryCliExec(params) {
sentryCliExec(command, subCommand) {
const authToken = this.readConfig('authToken');
const orgName = this.readConfig('orgName');
const appName = this.readConfig('appName');
Expand All @@ -79,10 +79,10 @@ module.exports = {
path.join('node_modules', '.bin', 'sentry-cli'),
url ? `--url ${url}` : '',
`--auth-token ${authToken}`,
'releases',
command,
`--org ${orgName}`,
`--project ${appName}`,
params
subCommand
].join(' ')
);
},
Expand Down

0 comments on commit 7c0a4cc

Please sign in to comment.