From: garciadeblas Date: Fri, 21 Apr 2017 13:09:26 +0000 (+0200) Subject: Changes in Makefile and Jenkinsfile to follow the rest of repos X-Git-Tag: v2.0.0~18 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=d40e5512e979654e90b190711c4d3ff14b6a878b;p=osm%2FRO.git Changes in Makefile and Jenkinsfile to follow the rest of repos Change-Id: I9975870258111a04469afad44418ab94950015f0 Signed-off-by: garciadeblas --- diff --git a/Jenkinsfile b/Jenkinsfile index d67084f8..833bcff5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,8 +6,7 @@ pipeline { dockerfile true } steps { - sh 'make clean build' - sh 'make clean package' + sh 'make package' stash name: "deb-files", includes: ".build/*.deb" } } @@ -24,7 +23,7 @@ pipeline { unstash "deb-files" sh ''' mkdir -p pool/RO - mv build/deb_dist/*.deb pool/RO/ + mv .build/*.deb pool/RO/ mkdir -p dists/$RELEASE/unstable/RO/binary-amd64/ apt-ftparchive packages pool/RO > dists/$RELEASE/unstable/RO/binary-amd64/Packages gzip -9fk dists/$RELEASE/unstable/RO/binary-amd64/Packages diff --git a/Makefile b/Makefile index b5f6ac59..71425c6c 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,13 @@ SHELL := /bin/bash all: package install +clean_deb: + rm -rf .build + +clean: + rm -rf build + find osm_ro -name '*.pyc' -delete + find osm_ro -name '*.pyo' -delete prepare: pip install setuptools mkdir -p build/ @@ -29,17 +36,19 @@ connectors: prepare python build/osm_ro/openmanolinkervimconn.py rm -f build/osm_ro/openmanolinkervimconn.py -build: connectors prepare +build: clean connectors prepare python -m py_compile build/osm_ro/*.py pip: prepare cd build && ./setup.py sdist -package: prepare +package: clean clean_deb prepare #apt-get install -y python-stdeb cd build && python setup.py --command-packages=stdeb.command sdist_dsc --with-python2=True cd build && cp osm_ro/scripts/python-osm-ro.postinst deb_dist/osm-ro*/debian/ cd build/deb_dist/osm-ro* && dpkg-buildpackage -rfakeroot -uc -us + mkdir -p .build + cp build/deb_dist/python-*.deb ./build/ snap: echo "Nothing to be done yet" @@ -48,7 +57,7 @@ install: DEBIAN_FRONTEND=noninteractive apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y python-pip && \ pip install --upgrade pip && \ - dpkg -i build/deb_dist/*.deb + dpkg -i .build/*.deb develop: prepare #pip install -r requirements.txt @@ -66,8 +75,4 @@ run-docker: stop-docker: docker-compose -f docker/openmano-compose.yml down -clean: - rm -rf build - find osm_ro -name '*.pyc' -delete - find osm_ro -name '*.pyo' -delete