[Bugfix] Update version bump to bump the minor version and reset beta version (#4394)
* make it minor bump * add stable mode * update workflow to use new stable mode * Change files * update naming
This commit is contained in:
Родитель
af0d9f3a29
Коммит
a0868a3867
|
@ -140,7 +140,7 @@ jobs:
|
|||
- name: Bump versions for pre-release branch if stable release
|
||||
if: ${{ startsWith(github.event.inputs.branch, 'prerelease-stable') }}
|
||||
run: |
|
||||
node common/scripts/bump-beta-release-version.js beta
|
||||
node common/scripts/bump-beta-release-version.js beta-next
|
||||
rush update
|
||||
git add .
|
||||
git commit -m "Bump package versions to beta.0 for next release"
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"type": "none",
|
||||
"area": "fix",
|
||||
"workstream": "CI",
|
||||
"comment": "Fixes issue where version bump on stable releases was only bumping the patch version",
|
||||
"packageName": "@azure/communication-react",
|
||||
"email": "94866715+dmceachernmsft@users.noreply.github.com",
|
||||
"dependentChangeType": "none"
|
||||
}
|
|
@ -8,7 +8,7 @@ const bumpType = process.argv[2];
|
|||
const main = () => {
|
||||
const packagePaths = findAllPackageJSON(PACKAGES_DIR);
|
||||
const depNames = getAllNames(packagePaths);
|
||||
if (!['major', 'minor', 'patch', 'beta'].includes(bumpType)) {
|
||||
if (!['major', 'minor', 'patch', 'beta', 'beta-next'].includes(bumpType)) {
|
||||
throw '\nplease add either major/minor/patch/beta as a parameter!\n\n Syntax:\n node bump-beta-release-version.js minor\n'
|
||||
}
|
||||
updateAllVersions(bumpBetaVersion);
|
||||
|
@ -31,6 +31,12 @@ const bumpBetaVersion = (currentVersion) => {
|
|||
}
|
||||
const newBeta = Number.parseInt(betaVersion) + 1;
|
||||
return `${major}.${minor}.${patch}-beta.${newBeta}`
|
||||
} else if (bumpType === 'beta-next') {
|
||||
// if bumpType is stable we want to reset the beta version
|
||||
const newMinor = Number.parseInt(minor) + 1;
|
||||
// patch version goes to 0 since we are bumping the next beta version's minor and we want to
|
||||
// reset the patch version to 0
|
||||
return `${major}.${newMinor}.${0}-beta.0`;
|
||||
} else {
|
||||
const newMajor = bumpType === 'major' ? Number.parseInt(major) + 1 : major;
|
||||
const newMinor = bumpType === 'major' ?
|
||||
|
|
Загрузка…
Ссылка в новой задаче