Commit 6f35aa66 authored by Laurent Peuch's avatar Laurent Peuch
Browse files

chore(tox): add new-version

parent bf2ace7f24fa
......@@ -97,3 +97,17 @@ commands =
dpkg-buildpackage -us -uc --no-check-builddeps --build=source "
sh -c "cd dist && dcmd zip latest.zip *.changes"
http -f POST https://{env:JENKINS_USER}:{env:JENKINS_TOKEN}@{env:JENKINS_FQDN}/job/pkg-from-dsc/buildWithParameters DIST=buster source.zip@dist/latest.zip REPO=buster PUBLISH=true
[testenv:new-version]
basepython = python3
skip_install = true
passenv = DEBEMAIL DEBFULLNAME TERM
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 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