This repository was archived by the owner on Sep 12, 2024. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathmakefile
More file actions
77 lines (61 loc) · 2.04 KB
/
Copy pathmakefile
File metadata and controls
77 lines (61 loc) · 2.04 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
help:
$(info * deployment: build, publish, publish-test)
$(info * versioning: bump-patch, bump-minor, bump-major)
$(info * setup: venv)
clean-build:
$(info * cleaning build files)
@find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__
@rm -rf stonky.egg-info build dist
clean-venv:
$(info * removing venv files)
@deactivate 2> /dev/null || true
@rm -rf venv
clean: clean-build clean-venv
# Deployment Helpers -----------------------------------------------------------
build: clean-build
$(info * building distributable)
@python3 setup.py sdist bdist_wheel --universal > /dev/null
publish: build
$(info * publishing to PyPI repository)
twine upload --repository-url https://upload.pypi.org/legacy/ dist/*.whl
publish-test: build
$(info * publishing to PyPI test repository)
twine upload --repository-url https://test.pypi.org/legacy/ dist/*.whl
# Version Helpers --------------------------------------------------------------
bump-patch:
$(info * resetting any current changes)
git reset --
$(info * bumping patch version)
@vbump --patch
git add stonky/__version__.py
$(info * commiting version change)
git commit -m "Patch version bump"
$(info * creating tag)
git tag `vbump | egrep -o '[0-9].*'`
bump-minor:
$(info * resetting any current changes)
git reset --
$(info * bumping minor version)
vbump --minor
git add stonky/__version__.py
$(info * commiting version change)
git commit -m "Minor version bump"
$(info * creating tag)
git tag `vbump | egrep -o '[0-9].*'`
bump-major:
$(info * resetting any current changes)
git reset --
$(info * bumping major version)
vbump --major
git add stonky/__version__.py
$(info * commiting version change)
git commit -m "Major version bump"
$(info * creating tag)
git tag `vbump | egrep -o '[0-9].*'`
# Setup Helpers ----------------------------------------------------------------
venv: clean-venv
$(info * initializing venv)
@python3 -m venv venv
$(info * installing dev requirements)
@./venv/bin/pip install -qU pip
@./venv/bin/pip install -qr requirements-dev.txt