Add bumpversion configuration files

pull/6294/head
Jeremy Tuloup 5 years ago
parent 7a519059bf
commit bb2dbdf1c6

@ -0,0 +1,20 @@
[bumpversion]
current_version = 0, 1, 3, 'final', 0
commit = False
tag = False
parse = (?P<major>\d+)\,\ (?P<minor>\d+)\,\ (?P<patch>\d+)\,\ \'(?P<release>\S+)\'\,\ (?P<build>\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]

@ -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);

Loading…
Cancel
Save