Skip to content

Commit c3aff6b

Browse files
committed
Update commands with newer syntax
1 parent d4bf77d commit c3aff6b

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ module.exports = {
5858
this.log("SENTRY: Assigning commits...");
5959
this.sentryCliExec(
6060
"releases",
61-
`set-commits "${releaseName}" --auto --ignore-missing --ignore-empty`
61+
`set-commits "${releaseName}" --auto --ignore-missing`
6262
);
6363

6464
this.log("SENTRY: Uploading source maps...");
6565
this.sentryCliExec(
66-
"releases",
67-
`files "${releaseName}" upload-sourcemaps --rewrite ${assetsDir} ${urlPrefix}`
66+
"sourcemaps",
67+
`upload --release "${releaseName}" --rewrite ${assetsDir} ${urlPrefix}`
6868
);
6969

7070
this.log("SENTRY: Finalizing release...");
@@ -80,8 +80,8 @@ module.exports = {
8080

8181
this.log("SENTRY: Deploying release...");
8282
this.sentryCliExec(
83-
"releases",
84-
`deploys "${releaseName}" new -e ${environment}`
83+
"deploys",
84+
`new --release "${releaseName}" -e ${environment}`
8585
);
8686
this.log("SENTRY: Deployed!");
8787
},
@@ -104,13 +104,13 @@ module.exports = {
104104
return this._exec(
105105
[
106106
sentryCliAbsoluteBinLocation,
107-
url ? `--url ${url}` : "",
107+
url ? `--url ${url}` : null,
108108
`--auth-token ${authToken}`,
109109
command,
110110
`--org ${orgName}`,
111111
`--project ${appName}`,
112112
subCommand,
113-
].join(" ")
113+
].filter(Boolean).join(" ")
114114
);
115115
},
116116

tests/unit/index-nodetest.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ describe('sentry-cli', function () {
172172

173173
this.sinon.assert.calledWithExactly(
174174
stub,
175-
`${SENTRY_BIN_PATH} --auth-token my-auth-token releases --org my-org --project my-project new "[email protected]@1234567"`
175+
`${SENTRY_BIN_PATH} --auth-token my-auth-token releases --org my-org --project my-project new "[email protected]@1234567"`
176176
);
177177
});
178178

@@ -186,7 +186,7 @@ describe('sentry-cli', function () {
186186

187187
this.sinon.assert.calledWithExactly(
188188
stub,
189-
`${SENTRY_BIN_PATH} --auth-token my-auth-token releases --org my-org --project my-project set-commits "[email protected]@1234567" --auto --ignore-missing --ignore-empty`
189+
`${SENTRY_BIN_PATH} --auth-token my-auth-token releases --org my-org --project my-project set-commits "[email protected]@1234567" --auto --ignore-missing`
190190
);
191191
});
192192

@@ -200,7 +200,7 @@ describe('sentry-cli', function () {
200200

201201
this.sinon.assert.calledWithExactly(
202202
stub,
203-
`${SENTRY_BIN_PATH} --auth-token my-auth-token releases --org my-org --project my-project files "[email protected]@1234567" upload-sourcemaps --rewrite ${path.join(
203+
`${SENTRY_BIN_PATH} --auth-token my-auth-token sourcemaps --org my-org --project my-project upload --release "[email protected]@1234567" --rewrite ${path.join(
204204
'my-dest-dir',
205205
'assets'
206206
)} `
@@ -219,7 +219,7 @@ describe('sentry-cli', function () {
219219

220220
this.sinon.assert.calledWithExactly(
221221
stub,
222-
`${SENTRY_BIN_PATH} --auth-token my-auth-token releases --org my-org --project my-project files "[email protected]@1234567" upload-sourcemaps --rewrite ${path.join(
222+
`${SENTRY_BIN_PATH} --auth-token my-auth-token sourcemaps --org my-org --project my-project upload --release "[email protected]@1234567" --rewrite ${path.join(
223223
'my-dest-dir',
224224
'assets'
225225
)} --url-prefix ~/assets`
@@ -236,7 +236,7 @@ describe('sentry-cli', function () {
236236

237237
this.sinon.assert.calledWithExactly(
238238
stub,
239-
`${SENTRY_BIN_PATH} --auth-token my-auth-token releases --org my-org --project my-project finalize "[email protected]@1234567"`
239+
`${SENTRY_BIN_PATH} --auth-token my-auth-token releases --org my-org --project my-project finalize "[email protected]@1234567"`
240240
);
241241
});
242242
});
@@ -252,7 +252,7 @@ describe('sentry-cli', function () {
252252

253253
this.sinon.assert.calledWithExactly(
254254
stub,
255-
`${SENTRY_BIN_PATH} --auth-token my-auth-token releases --org my-org --project my-project deploys "[email protected]@1234567" new -e my-production`
255+
`${SENTRY_BIN_PATH} --auth-token my-auth-token deploys --org my-org --project my-project new --release "[email protected]@1234567" -e my-production`
256256
);
257257
});
258258
});
@@ -268,7 +268,7 @@ describe('sentry-cli', function () {
268268

269269
this.sinon.assert.calledWithExactly(
270270
stub,
271-
`${SENTRY_BIN_PATH} --auth-token my-auth-token releases --org my-org --project my-project delete "[email protected]@1234567"`
271+
`${SENTRY_BIN_PATH} --auth-token my-auth-token releases --org my-org --project my-project delete "[email protected]@1234567"`
272272
);
273273
});
274274
});

0 commit comments

Comments
 (0)