2021-08-19 12:18:54 -04:00
|
|
|
# Set output dir
|
|
|
|
BUILDDIR=dist
|
2021-08-20 08:33:29 -04:00
|
|
|
PROJECT_BASE=task_status
|
2021-08-19 12:18:54 -04:00
|
|
|
|
|
|
|
#GH/github command used to initiate a release
|
|
|
|
GH=/usr/bin/gh
|
|
|
|
|
|
|
|
test:
|
|
|
|
pytest -v
|
|
|
|
|
2021-08-26 13:25:20 -04:00
|
|
|
build: dir
|
2021-08-19 12:18:54 -04:00
|
|
|
poetry build
|
|
|
|
|
|
|
|
dir:
|
|
|
|
[ -d $(BUILDDIR) ] || mkdir -p $(BUILDDIR)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf $(BUILDDIR)
|
2021-08-19 12:55:20 -04:00
|
|
|
find . -name __pycache__|xargs rm -rf
|
2021-08-19 12:18:54 -04:00
|
|
|
|
|
|
|
poetry-release: build
|
|
|
|
poetry publish
|
|
|
|
|
2021-08-20 08:33:29 -04:00
|
|
|
pyflakes:
|
2021-08-20 08:48:54 -04:00
|
|
|
pyflakes ${PROJECT_BASE}
|
2021-08-20 08:33:29 -04:00
|
|
|
|
|
|
|
pylint:
|
|
|
|
pylint ${PROJECT_BASE}
|
|
|
|
|
2021-08-19 12:18:54 -04:00
|
|
|
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
|