diff --git a/README.md b/README.md index 32ea225..2ca1ce4 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ The plugin can be configured in the [**semantic-release** configuration file](ht | `sourcemaps` | Directory with sourcemaps. Example `dist`. Optional for upload sourcemaps | | `urlPrefix` | URL prefix for sourcemaps. Example `~/dist`. Optional for upload sourcemaps | | `rewrite` | Boolean to indicate rewrite sourcemaps. Default `false`. Optional for upload sourcemaps | -| `releasePrefix` | String that is passed as prefix to the sentry release.
Optional to fix the problem that releases are associated with the organization instead of the project ([Read More](https://github.com/getsentry/sentry-cli/issues/482)).
Ex: `releasePrefix:"web1"` would resolve **only** the sentry release to `web1-1.0.0`.
**Important Notice:** when you use this feature you also have to change the release name in your sentry client app. | +| `releasePrefix` | String that is passed as prefix to the sentry release.
Optional to fix the problem that releases are associated with the organization instead of the project ([Read More](https://github.com/getsentry/sentry-cli/issues/482)).
Ex: `releasePrefix:"web1"` would resolve **only** the sentry release to `web1@1.0.0`.
**Important Notice:** when you use this feature you also have to change the release name in your sentry client app. | | `pathToGitFolder` | Path to `.git` folder, relative to the current working directory. Optional. Defaults to current working directory | diff --git a/src/publish.js b/src/publish.js index aaf6ad8..83d1385 100644 --- a/src/publish.js +++ b/src/publish.js @@ -69,7 +69,7 @@ module.exports = async (pluginConfig, ctx) => { const commits = await parseCommits(pluginConfig, ctx) ctx.logger.log('Commit data retrieved') const sentryReleaseVersion = pluginConfig.releasePrefix - ? `${pluginConfig.releasePrefix}-${ctx.nextRelease.version}` + ? `${pluginConfig.releasePrefix}@${ctx.nextRelease.version}` : ctx.nextRelease.version /** @type {SentryReleaseParams} */ const releaseDate = { diff --git a/test/publish.test.js b/test/publish.test.js index ff41aec..c343241 100644 --- a/test/publish.test.js +++ b/test/publish.test.js @@ -167,11 +167,11 @@ describe('Publish', () => { }, ], ref: '6ba09a7c53235ee8a8fa5ee4c1ca8ca886e7fdbb', - shortVersion: 'web1-1.0.0', + shortVersion: 'web1@1.0.0', url: null, - version: 'web1-1.0.0', + version: 'web1@1.0.0', }) - .post('/api/0/organizations/valid/releases/web1-1.0.0/deploys/') + .post('/api/0/organizations/valid/releases/web1@1.0.0/deploys/') .reply(201, { name: 'amazon', url: 'https://api.example.com/', @@ -254,7 +254,7 @@ describe('Publish', () => { ctx, ) expect(result.release.version).to.equal( - `${releasePrefix}-${ctx.nextRelease.version}`, + `${releasePrefix}@${ctx.nextRelease.version}`, ) })