diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:27:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:27:43 +0000 |
commit | 5a5427c3888e2619d53f6943447b7db5bf082366 (patch) | |
tree | 3ecafb5ca77f89abdeddb14eb42f90187b811e0d /Makefile | |
parent | Initial commit. (diff) | |
download | asciinema-5a5427c3888e2619d53f6943447b7db5bf082366.tar.xz asciinema-5a5427c3888e2619d53f6943447b7db5bf082366.zip |
Adding upstream version 2.2.0.upstream/2.2.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | Makefile | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2700bf7 --- /dev/null +++ b/Makefile @@ -0,0 +1,75 @@ +NAME := asciinema +VERSION := $(shell python3 -c "import asciinema; print(asciinema.__version__)") + +VIRTUAL_ENV ?= .venv + +.PHONY: test +test: test.unit test.integration + +.PHONY: test.unit +test.unit: + pytest + +.PHONY: test.integration +test.integration: + tests/integration.sh + +.PHONY: test.distros +test.distros: + tests/distros.sh + +.PHONY: release +release: test tag push + +.PHONY: release.test +release.test: test push.test + +.PHONY: .tag.exists +.tag.exists: + @git tag \ + | grep -q "v$(VERSION)" \ + && echo "Tag v$(VERSION) exists" \ + && exit 1 + +.PHONY: tag +tag: .tag.exists + git tag -s -m "Releasing $(VERSION)" v$(VERSION) + git push origin v$(VERSION) + +.PHONY: .venv +.venv: + python3 -m venv $(VIRTUAL_ENV) + +.PHONY: .pip +.pip: .venv + . $(VIRTUAL_ENV)/bin/activate \ + && python3 -m pip install --upgrade build twine + +build: .pip + . $(VIRTUAL_ENV)/bin/activate \ + && python3 -m build . + +install: build + . $(VIRTUAL_ENV)/bin/activate \ + && python3 -m pip install . + +.PHONY: push +push: .pip build + python3 -m twine upload dist/* + +.PHONY: push.test +push.test: .pip build + python3 -m twine upload --repository testpypi dist/* + + +.PHONY: clean +clean: + rm -rf dist *.egg-info + +clean.all: clean + find . \ + -type d \ + -name __pycache__ \ + -o -name .pytest_cache \ + -o -name .mypy_cache \ + -exec rm -r "{}" + |