-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
80 lines (69 loc) · 2.59 KB
/
Makefile
File metadata and controls
80 lines (69 loc) · 2.59 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
BUILDVER_FILE=.release/build
IMG_EG_SRC=library/test/expected-images
IMG_EG_DOC=doc/img/examples
include .release/release_config
.PHONY: python-newbuild
library/lint:
cd library; flake8 . --statistics
library/test: library/lint
mkdir -p library/test/expected-images/
cd library; python3 -m unittest -b -v
library/build: library/test
library/README.md: README.md
cp README.md library/
library/LICENSE.txt: LICENSE
cp LICENSE library/LICENSE.txt
library: library/build
library/package: library/README.md library/LICENSE.txt
git-pull:
git pull --all --prune
release-docs:
test -d '$(IMG_EG_SRC)'
mkdir -p '$(IMG_EG_DOC)'
rm $(IMG_EG_DOC)/*.png
cp $(IMG_EG_SRC)/test-alternatePackingMode.png $(IMG_EG_DOC)/alternatePackingMode.png
cp $(IMG_EG_SRC)/test-packingBias.png $(IMG_EG_DOC)/packingBias.png
cp $(IMG_EG_SRC)/test-rotated-UP-add-3-layers.png $(IMG_EG_DOC)/rotation_UP.png
cp $(IMG_EG_SRC)/test-rotated-LEFT-add-3-layers.png $(IMG_EG_DOC)/rotation_LEFT.png
cp $(IMG_EG_SRC)/test-rotated-DOWN-add-3-layers.png $(IMG_EG_DOC)/rotation_DOWN.png
cp $(IMG_EG_SRC)/test-rotated-RIGHT-add-3-layers.png $(IMG_EG_DOC)/rotation_RIGHT.png
release-precheck:
echo "VERSION: ${VERSION}"
echo "RELEASE_FROM: ${RELEASE_FROM}"
test -n "${VERSION}" || { echo "VERSION invalid" && exit 1; }
release-reset: release-precheck
git restore 'library/setup.py' '.release/build'
git tag -d 'v${VERSION}' && git push --delete origin 'v${VERSION}'
release-branch:
git stash
git fetch --all --tags
git checkout main
release-newbuild:
cd .release; ./increment-build.sh
git add '.release/build'
release-update-setup: release-precheck release-newbuild
echo "VERSION:${VERSION}"
sed -e "s:\%GITVER\%:${VERSION}:" 'library/setup.py.template' > 'library/setup.py'
git add 'library/setup.py'
release: library/test release-precheck release-branch release-update-setup
git restore "library/test"
git commit -m"Release ${VERSION}"
# git tag will fail if the tag already exists.
git tag "v${VERSION}" -a -m"Release v${VERSION} (`date +'%Y-%m-%d'`)"
git push origin "v${VERSION}"
git push origin main
python-clean:
-rm -r library/dist
-rm -r library/README.md
-rm -r library/LICENSE.txt
-rm -r library/*.egg-info/
python-dist: library/package
cd library; python3 setup.py sdist bdist_wheel
# To get this to work, you had to set up ~/.pypirc with username __token__ and
# your API token.
python-testdeploy: python-dist
python3 -m twine upload --repository testpypi library/dist/*
# To get this to work, you had to set up ~/.pypirc with username __token__ and
# your API token.
python-deploy: python-dist
python3 -m twine upload library/dist/*