-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
187 lines (158 loc) · 5.72 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
all:
@echo "install_requirements install all required tools"
@echo "pass_1 check out sources and update everything automatically"
@echo "pass_2 create changelog and commit changes"
@echo "pass_3 push changes and create a release draft"
@echo "pass_4 upload documentation and close all branches"
@echo "clean delete generated files"
@echo "veryclean also delete checkout"
##########################################################
# requirements
##########################################################
install_requirements: homebrew_tools python_tools ruby_tools
homebrew_tools:
brew install imagemagick python3 gnu-sed jq git-flow-avh coreutils
python_tools:
rm -fr venv
python3 -mvenv venv
venv/bin/pip3 install -r requirements.txt
ruby_tools:
gem install github_changelog_generator --user-install
uninstall_requirements:
rm -fr venv
##########################################################
# passes
##########################################################
# do anything that can be done automatically
pass_1: clone_repository create_release_branch update_slideshow bump_version
# finalize release
#pass_2: update_changelog update_avatars check_documentation commit_changes
pass_2: update_avatars check_documentation commit_changes
# upload changes
pass_3: push_changes create_release_draft
# do release
pass_4: upload_documentation close_branches
##########################################################
# scripts
##########################################################
clone_repository:
@echo "================================================================="
@echo " Clone repository"
@echo "================================================================="
@echo ""
scripts/clone/build.sh
create_release_branch:
@echo ""
@echo ""
@echo "================================================================="
@echo " Create release branch"
@echo "================================================================="
@echo ""
-scripts/release_branch/build.sh
update_slideshow:
@echo ""
@echo ""
@echo "================================================================="
@echo " Update slideshow"
@echo "================================================================="
@echo ""
make json.gif -C scripts/slideshow
cp scripts/slideshow/json.gif workdir/json/docs
cd workdir/json ; git add docs/json.gif
bump_version:
@echo ""
@echo ""
@echo "================================================================="
@echo " Bump version"
@echo "================================================================="
@echo ""
cd scripts/bump_version ; ../../venv/bin/python3 bump_version.py ../../workdir/json
update_avatars:
@echo ""
@echo ""
@echo "================================================================="
@echo " Update avatars"
@echo "================================================================="
@echo ""
mkdir -p scripts/avatars/cache
cd scripts/avatars ; ../../venv/bin/python3 avatars.py ../../workdir/json/README.md
cp scripts/avatars/avatars.png workdir/json/docs/avatars.png
cd workdir/json ; git add docs/avatars.png
update_changelog:
@echo ""
@echo ""
@echo "================================================================="
@echo " Update changelog"
@echo "================================================================="
@echo ""
cd scripts/changelog ; ./build.sh
cp scripts/changelog/ChangeLog.md workdir/json
cd workdir/json ; git add ChangeLog.md
check_documentation:
@echo ""
@echo ""
@echo "================================================================="
@echo " Check examples"
@echo "================================================================="
@echo ""
make check_output_portable -j16 -C workdir/json/docs CXX=g++-12
commit_changes:
@echo ""
@echo ""
@echo "================================================================="
@echo " Commit changes"
@echo "================================================================="
@echo ""
cd scripts/commit_changes ; ./commit_changes.sh
push_changes:
@echo ""
@echo ""
@echo "================================================================="
@echo " Push changes"
@echo "================================================================="
@echo ""
cd scripts/push_changes ; ./push_changes.sh
create_release_draft:
@echo ""
@echo ""
@echo "================================================================="
@echo " Create release draft"
@echo "================================================================="
@echo ""
make release -C workdir/json
cd scripts/create_release_draft ; ../../venv/bin/python3 create_release_draft.py ../../workdir/json
rm -fr workdir/json/release_files
upload_documentation:
@echo ""
@echo ""
@echo "================================================================="
@echo " Upload documentation"
@echo "================================================================="
@echo ""
make install_venv publish -C workdir/json/docs/mkdocs
close_branches:
@echo ""
@echo ""
@echo "================================================================="
@echo " Closing branches"
@echo "================================================================="
@echo ""
cd scripts/close_branches ; ./close_branches.sh
update_homebrew:
@echo ""
@echo ""
@echo "================================================================="
@echo " Closing branches"
@echo "================================================================="
@echo ""
cd scripts/update_homebrew ; ./update_homebrew.sh
##########################################################
# cleanup
##########################################################
clean:
make clean -C scripts/slideshow
make clean -C workdir/json
rm -f scripts/changelog/ChangeLog.md
rm -f scripts/avatars/avatars.png
veryclean: clean
rm -fr workdir/json