Skip to content

Commit

Permalink
chore: account for NEXT_VERSION variable set in CI (#25597)
Browse files Browse the repository at this point in the history
  • Loading branch information
AtofStryker committed Jan 26, 2023
1 parent f127deb commit 264ca72
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions scripts/get-next-version.js
Expand Up @@ -13,11 +13,6 @@ const bump = promisify(bumpCb)
const paths = ['packages', 'cli']

const getNextVersionForPath = async (path) => {
// allow the semantic next version to be overridden by environment
if (process.env.NEXT_VERSION) {
return process.env.NEXT_VERSION
}

let commits
const whatBump = (foundCommits) => {
// semantic version bump: 0 - major, 1 - minor, 2 - patch
Expand Down Expand Up @@ -54,7 +49,8 @@ const getNextVersionForPath = async (path) => {
})

return {
nextVersion: semver.inc(currentVersion, releaseType || 'patch'),
// allow the semantic next version to be overridden by environment
nextVersion: process.env.NEXT_VERSION || semver.inc(currentVersion, releaseType || 'patch'),
commits,
}
}
Expand Down

0 comments on commit 264ca72

Please sign in to comment.