From f7deb8c0a2eff8c1ba1168e150ae05cf8e4ad07e Mon Sep 17 00:00:00 2001 From: Alex Kelly Date: Thu, 19 Aug 2021 12:18:54 -0400 Subject: [PATCH] chore: added makefile --- Makefile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4ddea1e --- /dev/null +++ b/Makefile @@ -0,0 +1,31 @@ +# Set output dir +BUILDDIR=dist + +#GH/github command used to initiate a release +GH=/usr/bin/gh + +test: + pytest -v + +build: dir test + poetry build + +dir: + [ -d $(BUILDDIR) ] || mkdir -p $(BUILDDIR) + +clean: + rm -rf $(BUILDDIR) + +poetry-release: build + poetry publish + +gh-release: build + #Figure out what the last/most recent build is + $(eval LATEST = $(shell ls -t1 ${BUILDDIR}/*|head -n1)) + $(eval TAG = $(shell git describe --abbrev=0)) + @echo "Sending $(TAG) to github" + ${GH} release create $(TAG) $(LATEST) + +release: poetry-release gh-release + +.PHONY: dir clean release gh-release poetry-release