Commit 67ebe6fb authored by Élodie Thiéblin's avatar Élodie Thiéblin
Browse files

[Makefile] Add makefile for cube publication

parent 8ef76515821f
Pipeline #14508 passed with stage
in 4 minutes and 9 seconds
......@@ -11,3 +11,4 @@ include tox.ini
include .gitlab-ci.yml
prune debian
exclude cubicweb-elasticsearch.spec
exclude Makefile
VERSION:=$(shell python3 setup.py --version)
DEBVERSION:=$(shell dpkg-parsechangelog -S Version)
PACKAGE_NAME:=$(shell python3 setup.py --name)
.PHONY: clean
clean:
rm -rf dist
.PHONY: hg-clean
hg-clean:
hg clean --all --dirs --files
.PHONY: sdist
sdist:
python3 setup.py sdist
.PHONY: pypi
pypi: hg-clean sdist
twine upload dist/${PACKAGE_NAME}-${VERSION}.tar.gz
.PHONY: deb-src
.ONESHELL:
deb-src: clean hg-clean sdist
cd dist
tar xf ${PACKAGE_NAME}-${VERSION}.tar.gz
cd ${PACKAGE_NAME}-${VERSION}
cp -a ../../debian .
mk-origtargz --rename ../${PACKAGE_NAME}-${VERSION}.tar.gz
dpkg-buildpackage -us -uc --no-check-builddeps --build=source
.PHONY: deb-zip
.ONESHELL:
deb-zip: deb-src
cd dist
dcmd zip latest.zip *.changes
.PHONY: publish-debian
.ONESHELL:
publish-debian: deb-zip
http -f POST https://${JENKINS_USER}:${JENKINS_TOKEN}@jenkins.intra.logilab.fr/job/pkg-from-dsc/buildWithParameters DIST=buster source.zip@dist/latest.zip REPO=buster PUBLISH=true
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