-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(publish): fix version bump (#3784)
- Loading branch information
1 parent
6c89c16
commit 8606e39
Showing
1 changed file
with
4 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,12 +30,7 @@ const BUMP_TYPES = ['major', 'minor', 'patch', 'prerelease']; | |
* * `branch: string`: Branch name used to publish the new version (default `"master"`) | ||
* * `bump: BUMP_TYPES`: Force a specific version bump instead of relying on the commit message | ||
*/ | ||
export default async ({github, context, exec}, { | ||
dry = false, | ||
tag = 'latest', | ||
branch = 'master', | ||
bump = null | ||
} = {}) => { | ||
export default async ({github, context, exec}, {dry = false, tag = 'latest', branch = 'master', bump = null} = {}) => { | ||
const GIT_USERNAME = 'coveobot'; | ||
const GIT_EMAIL = '[email protected]'; | ||
const GIT_SSH_REMOTE = 'deploy'; | ||
|
@@ -63,7 +58,7 @@ export default async ({github, context, exec}, { | |
if (bump !== null && BUMP_TYPES.includes(bump)) { | ||
bumpInfo = {type: bump, preid: bump === 'prerelease' ? 'next' : undefined}; | ||
} else { | ||
bumpInfo = convention.recommendedBumpOpts.whatBump(parsedCommits); | ||
bumpInfo = convention.whatBump(parsedCommits); | ||
} | ||
|
||
const currentVersion = lastTag.replace(VERSION_PREFIX, ''); | ||
|
@@ -73,7 +68,7 @@ export default async ({github, context, exec}, { | |
console.info('Bumping %s to version %s', changedPackages.join(', '), newVersion); | ||
await pnpmBumpVersion(newVersion, lastTag, ['root']); | ||
|
||
let changelog = '' | ||
let changelog = ''; | ||
if (parsedCommits.length > 0) { | ||
changelog = await generateChangelog( | ||
parsedCommits, | ||
|
@@ -82,7 +77,7 @@ export default async ({github, context, exec}, { | |
...context.repo, | ||
host: 'https://github.com', | ||
}, | ||
convention.writerOpts | ||
convention.writerOpts, | ||
); | ||
await writeChangelog(PATH, changelog); | ||
} | ||
|