diff options
author | Noe Gaumont <ngaumont@logilab.fr> | 2020-12-17 14:16:50 +0100 |
---|---|---|
committer | Noe Gaumont <ngaumont@logilab.fr> | 2020-12-17 14:16:50 +0100 |
commit | a610722bab6e4dc55ec76c628ab45d0665452f2c (patch) | |
tree | 6d6652675d29baad1eeb9a65ecb033f2744595bb | |
parent | 9b40156409bcc22759f327fa93d2e67999169d8b (diff) | |
download | logilab-common-a610722bab6e4dc55ec76c628ab45d0665452f2c.tar.gz |
chore(tox): add deb and pypi publish
-rw-r--r-- | tox.ini | 40 |
1 files changed, 40 insertions, 0 deletions
@@ -55,3 +55,43 @@ format = pylint ignore = W503, E203, E731, E231 max-line-length = 100 exclude = docs/*,.tox/*,./test/data/* + +[testenv:pypi-publish] +basepython = python3 +skip_install = true +whitelist_externals = rm +deps = + twine +passenv = + TWINE_USERNAME + TWINE_PASSWORD +commands = + rm -rf build dist .egg .egg-info + python3 setup.py sdist bdist_wheel + twine check dist/* + twine upload --skip-existing dist/* + +[testenv:deb-publish] +passenv = JENKINS_USER JENKINS_TOKEN +basepython = python3 +skip_install = true +whitelist_externals = + rm + sh + hg + python3 +deps = + httpie +commands = + hg clean --all --dirs --files + rm -rf build dist .egg .egg-info + python3 setup.py sdist + 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 |