-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
79 lines (54 loc) · 1.81 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
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
TARGET=betterdungeons
VERSION_FILE= $(TARGET)/__version__.py
.PHONY: $(VERSION_FILE) tag bump push update_pyproject README.md
all:
@echo $(TARGET) release automation
@echo
@echo "patch_release - updates version and publishes"
@echo "major_release - updates version and publishes"
@echo "minor_release - updates version and publishes"
@echo
@echo "release - performs a patch_release"
@echo
@echo "MAJOR - updates version major number"
@echo "MINOR - updates version minor number"
@echo "PATCH - updates version patch number"
@echo "major - commits version update to git and tags"
@echo "minor - commits version update to git and tags"
@echo "patch - commits version update to git and tags"
@echo "update - updates __version__.py, commits and tags"
@echo "push - pushes commits and tags to origin/master"
@echo
@echo "clean - cleans up report files and/or directories"
README.md:
typer $(TARGET).__main__ utils docs --name $(TARGET) --output $@
sed -i '' -e "s///g" $@
MAJOR:
@poetry version major
MINOR:
@poetry version minor
PATCH:
@poetry version patch
major: MAJOR update
minor: MINOR update
patch: PATCH update
version_file: $(VERSION_FILE)
$(VERSION_FILE):
@awk '/^version/ {print $$0}' pyproject.toml | sed "s/version/__version__/" > $@
update: $(VERSION_FILE)
@git add pyproject.toml $(VERSION_FILE)
@awk '{print $$3}' $(VERSION_FILE) | xargs git commit -m
@awk '{print $$3}' $(VERSION_FILE) | xargs git tag
push:
@git push --tags origin master
publish:
@poetry build
@poetry publish
patch_release: patch push publish
major_release: major push publish
minor_release: minor push publish
release: patch_release
demo/demo.gif: demo/demo.mov
ffmpeg -i $< -filter_complex "[0:v] fps=12,scale=512:-1,split [a][b];[a] palettegen [p];[b][p] paletteuse" $@
clean:
@/bin/rm -rf