forked from nasa/harmony-service-lib-py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
32 lines (23 loc) · 766 Bytes
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
.PHONY: clean build publish test develop
VERSION ?= $(shell git describe --tags | sed 's/-/\+/' | sed 's/-/\./g')
REPO ?= https://upload.pypi.org/legacy/
REPO_USER ?= __token__
REPO_PASS ?= unset
version:
sed -i.bak "s/__version__ .*/__version__ = \"$(VERSION)\"/" harmony/__init__.py && rm harmony/__init__.py.bak
build: clean version
python -m pip install --upgrade --quiet setuptools wheel twine
python setup.py --quiet sdist bdist_wheel
publish: build
python -m twine check dist/*
python -m twine upload --username "$(REPO_USER)" --password "$(REPO_PASS)" --repository-url "$(REPO)" dist/*
clean:
rm -rf build dist *.egg-info || true
develop:
pip install -e .[dev]
lint:
flake8 harmony
test:
pytest --cov=harmony tests
cve-check:
safety check