diff --git a/.bumpversion.cfg b/.bumpversion.cfg new file mode 100644 index 000000000..594bd5bb6 --- /dev/null +++ b/.bumpversion.cfg @@ -0,0 +1,20 @@ +[bumpversion] +current_version = 0, 1, 3, 'final', 0 +commit = False +tag = False +parse = (?P\d+)\,\ (?P\d+)\,\ (?P\d+)\,\ \'(?P\S+)\'\,\ (?P\d+) +serialize = + {major}, {minor}, {patch}, '{release}', {build} + +[bumpversion:part:release] +optional_value = final +values = + alpha + beta + candidate + final + +[bumpversion:part:build] + +[bumpversion:file:jupyterlab_classic/_version.py] + diff --git a/buildutils/src/patch.ts b/buildutils/src/patch.ts index 35ea1f7ac..a439454e1 100644 --- a/buildutils/src/patch.ts +++ b/buildutils/src/patch.ts @@ -7,6 +7,15 @@ import commander from 'commander'; import * as utils from '@jupyterlab/buildutils'; +/** + * Post-bump. + */ +export function postbump() { + const pyVersion = utils.getPythonVersion(); + // Commit changes. + utils.run(`git commit -am "Release ${pyVersion}"`); +} + // Specify the program signature. commander .description('Create a patch release') @@ -31,8 +40,13 @@ commander utils.run('bumpversion release --allow-dirty'); // switches to rc. utils.run('bumpversion release --allow-dirty'); // switches to final. + // Run post-bump actions. + postbump(); + + return; + // Version the changed - let cmd = 'lerna version patch -m "New version" --no-push'; + let cmd = 'jlpm run lerna patch --no-push --amend --force-publish'; if (options.force) { cmd += ' --yes'; } @@ -58,9 +72,6 @@ commander // lerna didn't version anything, so we assume the user aborted throw new Error('Lerna aborted'); } - - // Run post-bump actions. - utils.postbump(); }); commander.parse(process.argv);