From 58d80d4ef6a8aa60f6500a782cb17c4ad716412b Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Sun, 15 Dec 2019 01:51:33 -0500 Subject: Makefile: Add archive. * Makefile (VERSION): New variable (TARBALL): New variable. (PRD_WHEEL): Use VERSION for version. (archive): New target. (clean): Add archive/ --- Makefile | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2ad6b69..de7962a 100644 --- a/Makefile +++ b/Makefile @@ -7,12 +7,16 @@ # This file is part of nfsw. # +VERSION=0.1.0 + VENV_DIR=/usr/local/virtualenv/.nfsw VENV_CMD=virtualenv-3 JSHINT=~/.npm-packages/bin/jshint +TARBALL=nfsw-${VERSION}.tar.gz + PRD_HOST=vela -PRD_WHEEL=nfsw-0.1.0-py3-none-any.whl +PRD_WHEEL=nfsw-${VERSION}-py3-none-any.whl ACME_CONF=etc/acme-client.conf UWSGI_INI=etc/uwsgi/nfsw.ini @@ -58,6 +62,15 @@ build: python setup.py bdist_wheel .PHONY: build + +archive: + mkdir -p archive \ + && git archive --format=tar --prefix=nfsw-${VERSION}/ \ + v${VERSION} | gzip > archive/${TARBALL} \ + && gpg2 -sb --armor -o archive/${TARBALL}.sig archive/${TARBALL} +.PHONY: archive + + prd-init: ssh root@${PRD_HOST} \\"echo 'https://cdn.openbsd.org/pub/OpenBSD' \ > /etc/installurl \ @@ -167,6 +180,6 @@ prd-tb: .PHONY: prd-tb clean: - rm -rf build/ dist/ nfsw.egg-info/ instance + rm -rf build/ dist/ nfsw.egg-info/ instance archive/ find ./ -type d -name '__pycache__' -exec rm -rf {} + .PHONY: clean -- cgit v1.2.3