-
-
Notifications
You must be signed in to change notification settings - Fork 454
/
garden.yaml
292 lines (290 loc) · 12.2 KB
/
garden.yaml
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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
# Use "cargo install garden-tools" to install garden https://gitlab.com/garden-rs/garden
#
# # Installation
# garden install # Install git-cola to the installation ${prefix}
# garden doc # Generate documentation: html + manual pages
# garden install docs # Install documentation
#
# # Variables can be overridden using "-D name=value", e.g.:
# garden -D prefix=$PWD/dist install docs
# garden -D DESTDIR=/tmp/stage -D prefix=/usr/local install
#
# # Development
# garden test # Run the test suite
# garden fmt # Format code using "cercis"
# garden html # Generate documentation: html only
# garden man # Generate documentation: manual pages only
# garden pot # Regenerate git-cola.pot with new translations
# garden po # Update .po files with new translations from git-cola.pot
# garden pages # Install the pages/ website documentation.
#
# # macOS
# garden macos/app # Build a git-cola.app bundle
#
# # Related Projects
# garden grow pages # Clone the Git Cola homepage
# garden grow fedora # Clone the Fedora packaging
# garden grow deb # Clone the Debian packaging
# garden grow flatpak # Clone the Flatpak packaging
trees:
git-cola:
description: The highly-caffeinated Git GUI
path: "${GARDEN_CONFIG_DIR}"
url: "[email protected]:git-cola/git-cola.git"
commands:
clean: rm -rf build dist git_cola.egg-info git-cola-*.windows.zip
doc: garden ${GARDEN_CMD_VERBOSE} cmd docs html man -- "$@"
dev: ${PYTHON} -m venv --system-site-packages ${env_dir}
dev>:
- dev/extras
- dev/development
- dev/build
dev/build: ${activate} pip install --editable '.[build]'
dev/development: ${activate} pip install --editable '.[docs,dev,testing]'
dev/extras: ${activate} pip install --editable '.[extras]'
dev/pyqt6: ${activate} pip install --editable '.[pyqt6]'
dev/install: ${activate} pip install --editable .
dev/env: ${activate} "$@"
check>:
- test
- check/fmt
- doc
check/fmt: garden fmt -- --check
fmt: |
${activate}
cercis --version
git ls-files -- '*.py' |
grep -v ^qtpy |
xargs cercis "$@"
html: garden ${GARDEN_CMD_VERBOSE} html docs
install: |
if test -n "${DESTDIR}"
then
pip_root="--root=${DESTDIR}"
export DESTDIR="${DESTDIR}"
fi
pip install --disable-pip-version-check $pip_root --prefix="${prefix}" "$@" .
i18n>:
- pot
- po
macos/app: |
mkdir -p ${cola_app}/Contents/MacOS
mkdir -p ${cola_app_resources}
${PYTHON} -m venv ${cola_app_resources}
source ${cola_app_resources}/bin/activate
pip install '.[docs,extras,pyqt6]'
cp contrib/darwin/Info.plist contrib/darwin/PkgInfo ${cola_app}/Contents
if test -n "${cola_full_version}"
then
sed -i -e s/0.0.0.0/${cola_full_version}/ ${cola_app}/Contents/Info.plist
fi
sed -i -e s/0.0.0/${cola_version}/ ${cola_app}/Contents/Info.plist
cp contrib/darwin/git-cola ${cola_app}/Contents/MacOS
cp contrib/darwin/git-cola.icns ${cola_app}/Contents/Resources
garden ${GARDEN_CMD_VERBOSE} -D prefix=${cola_app_resources} install
garden ${GARDEN_CMD_VERBOSE} doc
garden ${GARDEN_CMD_VERBOSE} -D prefix=${cola_app_resources} install docs
man: garden ${GARDEN_CMD_VERBOSE} man docs
po: |
for po in cola/i18n/*.po
do
msgmerge \
--no-wrap \
--no-fuzzy-matching \
--sort-output \
--output-file $$po.new \
$$po \
cola/i18n/git-cola.pot
mv $$po.new $$po
done
pot: |
xgettext \
--language=Python \
--keyword=N_ \
--no-wrap \
--omit-header \
--sort-output \
--output-dir cola/i18n \
--output git-cola.pot \
cola/*.py \
cola/*/*.py
pages<: doc
pages: garden ${GARDEN_CMD_VERBOSE} -D prefix=${TREE_PATH}/pages install docs "$@"
publish: |
${activate}
twine upload --sign dist/*.whl dist/*.tar.gz
run: ${activate} ./bin/git-cola "$@"
run/qt6: ${activate} QT_API=PyQt6 ./bin/git-cola "$@"
test: ${activate} ${PYTEST} cola test "$@"
tox: tox run "$@"
tox/check: tox run -e check "$@"
wheel: ${activate} python3 -m build -n .
gitconfig:
remote.publish.pushurl:
- "[email protected]:git-cola/git-cola.git"
- "[email protected]:git-cola/git-cola.git"
remotes:
BaumiCoder: "https://github.com/BaumiCoder/git-cola.git"
DasaniT: "https://github.com/DasaniT/git-cola.git"
Mailaender: "https://github.com/Mailaender/git-cola.git"
Mithil467: "https://github.com/Mithil467/git-cola.git"
NielBuys: "https://github.com/NielBuys/git-cola.git"
WNguyen14: "https://github.com/WNguyen14/git-cola.git"
abid1998: "https://github.com/abid1998/git-cola.git"
achernet: "https://github.com/achernet/git-cola.git"
axel-h: "https://github.com/axel-h/git-cola.git"
bearsh: "https://github.com/bearsh/git-cola.git"
bensmrs: "https://github.com/bensmrs/git-cola.git"
bobvanderlinden: "https://github.com/bobvanderlinden/git-cola.git"
brccabral: "https://github.com/brccabral/git-cola.git"
davvid: "[email protected]:davvid/git-cola.git"
dschwoerer: "https://github.com/dschwoerer/git-cola.git"
florisla: "https://github.com/florisla/git-cola.git"
fu7mu4: "https://github.com/fu7mu4/git-cola.git"
gdebure: "https://github.com/gdebure/git-cola.git"
github: "[email protected]:git-cola/git-cola.git"
guoyunhe: "https://github.com/guoyunhe/git-cola.git"
gyuris: "https://github.com/gyuris/git-cola.git"
haffmans: "https://github.com/haffmans/git-cola.git"
harmathy: "https://github.com/harmathy/git-cola.git"
hsoft: "https://github.com/hsoft/git-cola.git"
jamie-pate: "https://github.com/jamie-pate/git-cola.git"
kenyuy: "https://github.com/kenyuy/git-cola.git"
kisaragi-hiu: "https://github.com/kisaragi-hiu/git-cola.git"
kneirinck: "https://github.com/kneirinck/git-cola.git"
kurtmckee: "https://github.com/kurtmckee/git-cola.git"
laerreal: "https://github.com/laerreal/git-cola.git"
lah7: "https://github.com/lah7/git-cola.git"
living180: "https://github.com/living180/git-cola.git"
ljhcage: "https://github.com/ljhcage/git-cola.git"
malpas: "https://github.com/malpas/git-cola.git"
melkecelioglu: "https://github.com/melkecelioglu/git-cola.git"
milestone12: "https://github.com/milestone12/git-cola.git"
mmargoliono: "https://github.com/mmargoliono/git-cola"
mp-chet: "https://github.com/mp-chet/git-cola.git"
nakanoi: "https://github.com/nakanoi/git-cola.git"
nandalopes: "https://github.com/nandalopes/git-cola.git"
OriShalhon: "https://github.com/OriShalhon/git-cola.git"
pilarmolinalopez: "https://github.com/pilarmolinalopez/git-cola.git"
quintusfelix: "https://github.com/quintusfelix/git-cola.git"
rafaelreuber: "https://github.com/rafaelreuber/git-cola.git"
scop: "https://github.com/scop/git-cola.git"
sergei-dyshel: "https://github.com/sergei-dyshel/git-cola.git"
sthalik: "https://github.com/sthalik/git-cola.git"
skunkwerks: "https://github.com/skunkwerks/git-cola.git"
takluyver: "https://github.com/takluyver/git-cola.git"
thk123: "https://github.com/thk123/git-cola.git"
timgates42: "https://github.com/timgates42/git-cola.git"
vdragon: "https://github.com/Vdragon/git-cola.git"
victorhck: "https://github.com/victorhck/git-cola.git"
virtualstaticvoid: "https://github.com/virtualstaticvoid/git-cola.git"
wm4: "https://github.com/wm4/git-cola.git"
wojnilowicz: "https://github.com/wojnilowicz/git-cola.git"
yaellevy: "https://github.com/yaellevy/git-cola.git"
deb:
description: Debian packaging
url: "[email protected]:git-cola/git-cola-debian.git"
remotes:
davvid: "[email protected]:davvid/git-cola-debian.git"
docs:
description: Sphinx documentation
variables:
env_dir: ../env3
commands:
clean: rm -fr _build
doctest: ${activate} ${SPHINX} -b doctest . _build/doctest "$@"
html: ${activate} ${SPHINX} -b html . _build/html "$@"
man: ${activate} ${SPHINX} -b man . _build/man "$@"
linkcheck: ${activate} ${SPHINX} -b linkcheck . _build/linkcheck "$@"
install: |
mkdir -p "${DESTDIR}${docdir}"
install -m 644 *.html "${DESTDIR}${docdir}"
install -m 644 *.rst "${DESTDIR}${docdir}"
# HTML documentation
mkdir -p "${DESTDIR}${htmldir}"
rsync -r --delete --exclude=.buildinfo _build/html/ "${DESTDIR}${htmldir}/"
# Manual pages
mkdir -p "${DESTDIR}${mandir}"
install -m 644 _build/man/git-cola.1 "${DESTDIR}${mandir}"
install -m 644 _build/man/git-dag.1 "${DESTDIR}${mandir}"
fedora:
description: Fedora packaging
url: "https://src.fedoraproject.org/rpms/git-cola.git"
remotes:
git-cola: "[email protected]:git-cola/git-cola-fedora.git"
davvid: "[email protected]:davvid/git-cola-fedora.git"
flatpak:
description: Flatpak packaging
url: "[email protected]:flathub/com.github.git_cola.git-cola.git"
variables:
app-id: com.github.git_cola.git-cola
commands:
build: flatpak-builder "$@" --user "${prefix}" "${app-id}.yml"
check: |
flatpak run --command=flatpak-builder-lint \
org.flatpak.Builder "$@" --exceptions builddir "${prefix}"
install: flatpak-builder "$@" --install --user "${prefix}" "${app-id}.yml"
run: flatpak run ${app-id}
setup: |
flatpak remote-add --user --if-not-exists \
flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install --user \
org.flatpak.Builder/x86_64 \
org.kde.Sdk/x86_64/5.15-23.08 \
org.kde.Platform/x86_64/5.15-23.08 \
com.riverbankcomputing.PyQt.BaseApp/x86_64/5.15-23.08
pages:
description: "Git Cola's homepage"
url: "[email protected]:git-cola/git-cola.gitlab.io.git"
remotes:
github: "[email protected]:git-cola/git-cola.github.io.git"
ls-jad-elkik: "git://github.com/ls-jad-elkik/git-cola.github.io.git"
lz-coder: "https://github.com/lz-coder/git-cola.github.io.git"
gitconfig:
remote.origin.pushurl:
- "[email protected]:git-cola/git-cola.gitlab.io.git"
- "[email protected]:git-cola/git-cola.github.io.git"
commands:
build: jekyll build --destination build "$@"
links:
- "https://git-cola.gitlab.io"
- "https://git-cola.github.io"
commands:
commit: git commit "$@"
diff: git diff "$@"
diffs: git diff --staged "$@"
fetch: git fetch "$@"
stat: git status --short "$@"
status: git status "$@"
stage: git add -u "$@"
push: git push "$@"
pull: git pull --ff-only "$@"
# Variables can be overridden externally using "garden -D name=value ...".
variables:
# DESTDIR + prefix variables: https://www.gnu.org/software/make/manual/html_node/DESTDIR.html
DESTDIR: ""
prefix: ${GARDEN_CONFIG_DIR}/dist
docdir: ${prefix}/share/doc/git-cola
htmldir: ${docdir}/html
mandir: ${prefix}/share/man/man1
cola_app: ${TREE_PATH}/git-cola.app
cola_app_resources: ${cola_app}/Contents/Resources
cola_full_version: $ ./bin/git-cola version --brief --builtin
cola_version: $ sed -e "s/VERSION = '\(.*\)'/\1/" cola/_version.py
is_virtualenv: |
$ ${PYTHON} -c '
import os, sys
if sys.prefix != sys.base_prefix or os.environ.get("VIRTUAL_ENV"):
print("true")
'
env_dir: env3
activate: |
if test -z "${is_virtualenv}" && test -f "${env_dir}/bin/activate"
then
source "${env_dir}/bin/activate"
fi
# External commands and options
PYTEST: ${PYTHON} -B -m pytest ${PYTEST_OPTIONS}
PYTEST_OPTIONS: $ test "$(uname -s)" != Linux && printf '%s' --ignore=cola/inotify.py
PYTHON: python3
SPHINX: ${PYTHON} -m sphinx -d _build/doctrees -a