Commit 05e21939 authored by Laurent Peuch's avatar Laurent Peuch
Browse files

chore(tox): add new-version

parent ab46f353b016
Pipeline #64887 failed with stages
in 58 seconds
......@@ -75,3 +75,19 @@ skip_install = true
deps = yamllint
commands =
yamllint .
[testenv:new-version]
basepython = python3
skip_install = true
passenv = DEBEMAIL DEBFULLNAME
whitelist_externals =
sh
dch
commands =
sh -c "while [ -z $CONTINUE ]; do read -p 'Make a new version ? [y/n]: ' -r CONTINUE; done; if [ $CONTINUE != 'y' ] && [ $CONTINUE != 'Y' ] ; then echo Exiting version creation ; exit 1 ; fi"
sh -c "if [ ! command -v dch &> /dev/null] ; then echo dch could not be found ; exit 1 ; fi"
sh -c "if [ -z $DEBEMAIL ] || [ -z $DEBFULLNAME ] ; then echo Define the env variable DEBEMAIL and DEBFULLNAME ; exit 1 ; fi"
sh -c "echo -c '
Please verify what should be committed'"
sh -c "VERSION=$(python3 setup.py --version) && dch -v $VERSION'-'1 -D unstable 'New upstream release' && hg commit -i -m '[pkg] version '$VERSION && hg tag -r . $VERSION debian/$VERSION"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment