-
Notifications
You must be signed in to change notification settings - Fork 748
Expand file tree
/
Copy pathMakefile
More file actions
90 lines (73 loc) · 3.56 KB
/
Copy pathMakefile
File metadata and controls
90 lines (73 loc) · 3.56 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
78
79
80
81
82
83
84
85
86
87
88
89
90
# How to Make a Release
# ---------------------
#
# This file answers the question "how to make a release" hopefully
# better than a document does (only meejah and warner and shapr may
# currently do the "upload to PyPI" part anyway)
#
default:
echo "see Makefile"
lint:
tox -e flake8less
test:
python3 -m pytest
completions:
bash -c '_WORMHOLE_COMPLETE=bash_source wormhole > wormhole_complete.bash'
zsh -c '_WORMHOLE_COMPLETE=zsh_source wormhole > wormhole_complete.zsh'
fish -c '_WORMHOLE_COMPLETE=fish_source wormhole > wormhole_complete.fish'
# see Issue 524 for more; support bash < 4.4 for MacOS
patch -p1 < bash-completions-version-4.patch
release-undo-last-tag:
@echo "Cleanup stale release: " `python3 newest-version.py`
-rm NEWS.md.asc
rm dist/magic[_-]wormhole-`python3 newest-version.py`.tar.gz*
rm dist/magic_wormhole-`python3 newest-version.py`-py3-none-any.whl*
git tag -d `python3 newest-version.py`
# create a branch, like: git checkout -b prepare-release-0.16.0
# then run these, so CI can run on the release
release:
@echo "Is checkout clean?"
git diff-files --quiet
git diff-index --quiet --cached HEAD --
@echo "Install required build software"
python3 -m pip install --editable .[build]
@echo "Test README"
python3 setup.py check -r -s
@echo "Is GPG Agent running, and has key?"
gpg --pinentry=loopback -u ${MAINTAINER} --armor --clear-sign NEWS.md
@echo "Bump version and create tag"
python3 update-version.py
# python3 update-version.py --patch # for bugfix release
@echo "Build and sign wheel"
python3 setup.py bdist_wheel
gpg --pinentry=loopback -u ${MAINTAINER} --armor --detach-sign dist/magic_wormhole-`git describe --abbrev=0`-py3-none-any.whl
ls dist/*`git describe --abbrev=0`*
@echo "Build and sign source-dist"
python3 setup.py sdist
gpg --pinentry=loopback -u ${MAINTAINER} --armor --detach-sign dist/magic_wormhole-`git describe --abbrev=0`.tar.gz
ls dist/*`git describe --abbrev=0`*
release-test:
gpg --verify dist/magic_wormhole-`git describe --abbrev=0`.tar.gz.asc
gpg --verify dist/magic_wormhole-`git describe --abbrev=0`-py3-none-any.whl.asc
python3 -m venv testmf_venv
testmf_venv/bin/pip install --upgrade pip
testmf_venv/bin/pip install dist/magic_wormhole-`git describe --abbrev=0`-py3-none-any.whl
testmf_venv/bin/wormhole --version
testmf_venv/bin/pip uninstall -y magic_wormhole
testmf_venv/bin/pip install dist/magic_wormhole-`git describe --abbrev=0`.tar.gz[dev,dilate]
testmf_venv/bin/wormhole --version
echo "see also Issue 625: running tests inside unpacked sdist"
PATH=`pwd`/testmf_venv/bin:${PATH} pytest ./testmf_venv/lib/python*/site-packages/wormhole/test/
rm -rf testmf_venv
release-sign-announce:
gpg --pinentry=loopback -u ${MAINTAINER} --armor --clear-sign docs/releases/release-announce-`git describe --abbrev=0`
release-upload:
twine upload --username __token__ --password `cat PRIVATE-release-token` dist/magic_wormhole-`git describe --abbrev=0`-py3-none-any.whl dist/magic_wormhole-`git describe --abbrev=0`-py3-none-any.whl.asc dist/magic_wormhole-`git describe --abbrev=0`.tar.gz dist/magic_wormhole-`git describe --abbrev=0`.tar.gz.asc
mv dist/*-`git describe --abbrev=0`.tar.gz.asc signatures/
mv dist/*-`git describe --abbrev=0`-py3-none-any.whl.asc signatures/
git add signatures/magic_wormhole-`git describe --abbrev=0`.tar.gz.asc
git add signatures/magic_wormhole-`git describe --abbrev=0`-py3-none-any.whl.asc
git commit -m "signatures for release"
git push origin-push `git describe --abbrev=0`
dilation.png: dilation.seqdiag
seqdiag --no-transparency -T png --size 1000x800 -o dilation.png