Skip to content

Commit

Permalink
feat: Use @sentry/cli
Browse files Browse the repository at this point in the history
  • Loading branch information
HazAT committed Dec 7, 2017
1 parent fe0d6e1 commit c3e27ef
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 17 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v0.7.0

- Use @sentry/cli

## v0.6.1

- Fixed https://github.com/getsentry/react-native-sentry/issues/304
Expand Down
2 changes: 1 addition & 1 deletion lib/Helper/SentryCli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class SentryCli {
props['defaults/project'] = _.get(answers, 'config.project.slug', null);
props['auth/token'] = _.get(answers, 'config.auth.token', null);
try {
const cliPath = this.resolve('sentry-cli-binary/bin/sentry-cli');
const cliPath = this.resolve('@sentry/cli/bin/sentry-cli');
props['cli/executable'] = path
.relative(process.cwd(), cliPath)
.replace(/\\/g, '\\\\');
Expand Down
2 changes: 1 addition & 1 deletion lib/Steps/Initial.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ try {

try {
sentryCliPackage = require(path.join(
path.dirname(require.resolve('sentry-cli-binary')),
path.dirname(require.resolve('@sentry/cli')),
'package.json'
));
} catch {
Expand Down
10 changes: 5 additions & 5 deletions lib/Steps/Integrations/ReactNative.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export class ReactNative extends MobileProject {
code.replace(
/^.*?\/(packager|scripts)\/react-native-xcode\.sh\s*/m,
(match: any) =>
`../node_modules/sentry-cli-binary/bin/sentry-cli react-native xcode ${match}`
`../node_modules/@sentry/cli/bin/sentry-cli react-native xcode ${match}`
);
script.shellScript = JSON.stringify(code);
}
Expand All @@ -257,7 +257,7 @@ export class ReactNative extends MobileProject {
shellPath: '/bin/sh',
shellScript:
'export SENTRY_PROPERTIES=sentry.properties\\n' +
'../node_modules/sentry-cli-binary/bin/sentry-cli upload-dsym',
'../node_modules/@sentry/cli/bin/sentry-cli upload-dsym',
}
);
}
Expand Down Expand Up @@ -371,7 +371,7 @@ export class ReactNative extends MobileProject {
)
// legacy location for dsym upload
.replace(
/^..\/node_modules\/sentry-cli-binary\/bin\/sentry-cli upload-dsym\s*?\r?\n/m,
/^..\/node_modules\/@sentry\/cli\/bin\/sentry-cli upload-dsym\s*?\r?\n/m,
''
)
// remove sentry properties export
Expand All @@ -380,7 +380,7 @@ export class ReactNative extends MobileProject {
// entirely with the sentry-cli command we need to put the original
// version back in.
.replace(
/^(?:..\/node_modules\/sentry-cli-binary\/bin\/)?sentry-cli\s+react-native[\s-]xcode(\s+.*?)$/m,
/^(?:..\/node_modules\/@sentry\/cli\/bin\/)?sentry-cli\s+react-native[\s-]xcode(\s+.*?)$/m,
(match: any, m1: string) => {
const rv = m1.trim();
if (rv === '') {
Expand All @@ -404,7 +404,7 @@ export class ReactNative extends MobileProject {

if (
script.shellScript.match(/react-native-sentry\/bin\/bundle-frameworks\b/) ||
script.shellScript.match(/sentry-cli-binary\/bin\/sentry-cli\s+upload-dsym\b/)
script.shellScript.match(/@sentry\/cli\/bin\/sentry-cli\s+upload-dsym\b/)
) {
delete scripts[key];
delete scripts[key + '_comment'];
Expand Down
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
"definition": "dist/index.d.ts"
},
"dependencies": {
"@sentry/cli": "^1.26.0",
"chalk": "^2.3.0",
"glob": "^7.1.2",
"inquirer": "^4.0.0",
"lodash": "^4.17.4",
"open": "^0.0.5",
"r2": "^2.0.0",
"read-env": "^1.1.1",
"sentry-cli-binary": "^1.21.0",
"xcode": "^1.0.0",
"yargs": "^10.0.3"
},
Expand All @@ -49,9 +49,6 @@
"typescript": "^2.6.0",
"vrsource-tslint-rules": "^5.8.0"
},
"peerDependencies": {
"sentry-cli-binary": "^1.21.0"
},
"engines": {
"node": ">=6.9.5",
"npm": ">=3.10.7",
Expand Down
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
# yarn lockfile v1


"@sentry/cli@^1.26.0":
version "1.26.0"
resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-1.26.0.tgz#6f2c79375b9b6d264d33f228eb3de7d0091bd744"
dependencies:
progress "2.0.0"

"@types/inquirer@^0.0.35":
version "0.0.35"
resolved "https://registry.yarnpkg.com/@types/inquirer/-/inquirer-0.0.35.tgz#e054657cf2d10963823957d4d06ec244f05c65be"
Expand Down Expand Up @@ -2435,12 +2441,6 @@ sax@^1.2.1:
version "5.4.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e"

sentry-cli-binary@^1.21.0:
version "1.24.1"
resolved "https://registry.yarnpkg.com/sentry-cli-binary/-/sentry-cli-binary-1.24.1.tgz#1ba26f49e7d2a0906b9879e6da87804f01517969"
dependencies:
progress "2.0.0"

set-blocking@^2.0.0, set-blocking@~2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
Expand Down

0 comments on commit c3e27ef

Please sign in to comment.