Commit 98268486 authored by Laurent Peuch's avatar Laurent Peuch
Browse files

chore(tox): add new-version

parent a8fd1936bb21
Pipeline #29291 failed with stage
in 28 seconds
......@@ -64,3 +64,21 @@ commands =
sh -c "PACKAGE_NAME=$(python3 setup.py --name) && VERSION=$(python3 setup.py --version) && cd dist && tar xf $PACKAGE_NAME-$VERSION.tar.gz && cd $PACKAGE_NAME-$VERSION && cp -a {toxinidir}/debian . && mk-origtargz --rename ../$PACKAGE_NAME-$VERSION.tar.gz && 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}@jenkins.intra.logilab.fr/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
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