Skip to content

Commit ce408e3

Browse files
committed
fix(publish): support my-repo@[version] versions
Closes #653 BREAKING CHANGE: Use sentry [email protected] name instead of reponame-1.2.3 which doesn't match any convention in Sentry
1 parent ffb771d commit ce408e3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ The plugin can be configured in the [**semantic-release** configuration file](ht
6666
| `sourcemaps` | Directory with sourcemaps. Example `dist`. Optional for upload sourcemaps |
6767
| `urlPrefix` | URL prefix for sourcemaps. Example `~/dist`. Optional for upload sourcemaps |
6868
| `rewrite` | Boolean to indicate rewrite sourcemaps. Default `false`. Optional for upload sourcemaps |
69-
| `releasePrefix` | String that is passed as prefix to the sentry release. <br/> 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)). <br/> Ex: `releasePrefix:"web1"` would resolve **only** the sentry release to `web1-1.0.0`. <br/>**Important Notice:** when you use this feature you also have to change the release name in your sentry client app. |
69+
| `releasePrefix` | String that is passed as prefix to the sentry release. <br/> 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)). <br/> Ex: `releasePrefix:"web1"` would resolve **only** the sentry release to `web1@1.0.0`. <br/>**Important Notice:** when you use this feature you also have to change the release name in your sentry client app. |
7070

7171
| `pathToGitFolder` | Path to `.git` folder, relative to the current working directory. Optional. Defaults to current working directory |
7272

Diff for: src/publish.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ module.exports = async (pluginConfig, ctx) => {
6969
const commits = await parseCommits(pluginConfig, ctx)
7070
ctx.logger.log('Commit data retrieved')
7171
const sentryReleaseVersion = pluginConfig.releasePrefix
72-
? `${pluginConfig.releasePrefix}-${ctx.nextRelease.version}`
72+
? `${pluginConfig.releasePrefix}@${ctx.nextRelease.version}`
7373
: ctx.nextRelease.version
7474
/** @type {SentryReleaseParams} */
7575
const releaseDate = {

Diff for: test/publish.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ describe('Publish', () => {
255255
ctx,
256256
)
257257
expect(result.release.version).to.equal(
258-
`${releasePrefix}-${ctx.nextRelease.version}`,
258+
`${releasePrefix}@${ctx.nextRelease.version}`,
259259
)
260260
})
261261

0 commit comments

Comments
 (0)