-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
51 lines (37 loc) · 1.27 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
.PHONY : clean build upload bump_patch bump_minor bump_major push_release tag_release release_patch release_minor release_major
clean:
rm -rf build
rm -rf dist
rm -rf seqspec.egg-info
rm -rf docs/_build
rm -rf docs/api
rm -rf .coverage
bump_patch:
bumpversion patch
bump_minor:
bumpversion minor
bump_major:
bumpversion major
push_release:
git push && git push --tags
# Tag the release with the current version from bumpversion
tag_release:
git tag -a "v$$(python setup.py --version)" -m "Release v$$(python setup.py --version)"
# Build both the source distribution and wheel distribution
build: sdist wheel
# Build the source distribution
sdist:
python setup.py sdist
# Build the wheel distribution
wheel:
python -m build --wheel
# Upload both sdist and wheel to PyPI using twine
upload:
twine upload dist/*
# Combined commands for different types of releases
# Release a patch version: bump patch, build, tag, push, and upload
release_patch: clean bump_patch build tag_release push_release upload
# Release a minor version: bump minor, build, tag, push, and upload
release_minor: clean bump_minor build tag_release push_release upload
# Release a major version: bump major, build, tag, push, and upload
release_major: clean bump_major build tag_release push_release upload