garden: use 4-space indents
[git-cola.git] / garden.yaml
blob5497303cf2f51d2532c488153a352657d960878d
1 # Use "cargo install garden-tools" to install garden https://gitlab.com/garden-rs/garden
3 #   # Installation
4 #   garden install              # Install git-cola to the installation ${prefix}
5 #   garden doc                  # Generate documentation: html + manual pages
6 #   garden install docs         # Install documentation
8 #   # Variables can be overridden using "-D name=value", e.g.:
9 #   garden -D prefix=$PWD/dist install docs
10 #   garden -D DESTDIR=/tmp/stage -D prefix=/usr/local install
12 #   # Development
13 #   garden test                 # Run the test suite
14 #   garden fmt                  # Format code using "cercis"
15 #   garden html                 # Generate documentation: html only
16 #   garden man                  # Generate documentation: manual pages only
17 #   garden pot                  # Regenerate git-cola.pot with new translations
18 #   garden po                   # Update .po files with new translations from git-cola.pot
19 #   garden pages                # Install the pages/ website documentation.
21 #   # macOS
22 #   garden macos/app            # Build a git-cola.app bundle
24 #   # Related Projects
25 #   garden grow pages           # Clone the Git Cola homepage
26 #   garden grow fedora          # Clone the Fedora packaging
27 #   garden grow deb             # Clone the Debian packaging
28 #   garden grow flatpak         # Clone the Flatpak packaging
29 trees:
30     git-cola:
31         description: The highly-caffeinated Git GUI
32         path: "${GARDEN_CONFIG_DIR}"
33         url: "git@gitlab.com:git-cola/git-cola.git"
34         commands:
35             clean: rm -rf build dist git-cola-*.windows.zip
36             doc: ${GARDEN} -vv cmd docs html man -- "$@"
37             dev: ${PYTHON} -m venv --system-site-packages ${env_dir}
38             dev>:
39                 - dev/extras
40                 - dev/development
41                 - dev/build
42             dev/build: ${activate} ${PIP} install --editable '.[build]'
43             dev/development: ${activate} ${PIP} install --editable '.[docs,dev,testing]'
44             dev/extras: ${activate} ${PIP} install --editable '.[extras]'
45             dev/pyqt6: ${activate} ${PIP} install --editable '.[pyqt6]'
46             dev/env: ${activate} "$@"
47             check>:
48                 - test
49                 - check/fmt
50                 - doc
51             check/fmt: garden fmt -- --check
52             fmt: |
53                 ${activate}
54                 ${CERCIS} --version
55                 ${GIT} ls-files -- '*.py' |
56                 ${GREP} -v ^qtpy |
57                 ${XARGS} ${CERCIS} "$@"
58             html: ${GARDEN} -vv html docs
59             install: |
60                 if test -n "${DESTDIR}"
61                 then
62                     pip_root="--root=${DESTDIR}"
63                     export DESTDIR="${DESTDIR}"
64                 fi
65                 ${PIP} install --disable-pip-version-check \
66                     $pip_root --prefix=${prefix} "$@" .
67             i18n>:
68                 - pot
69                 - po
70             macos/app: |
71                 ${MKDIR_P} ${cola_app}/Contents/MacOS
72                 ${MKDIR_P} ${cola_app_resources}
73                 ${PYTHON} -m venv ${cola_app_resources}
74                 source ${cola_app_resources}/bin/activate
75                 ${PIP} install '.[docs,extras,pyqt6]'
76                 ${CP} contrib/darwin/Info.plist \
77                     contrib/darwin/PkgInfo ${cola_app}/Contents
78                 if test -n "${cola_full_version}"
79                 then
80                     ${SED} -i -e s/0.0.0.0/${cola_full_version}/ \
81                         ${cola_app}/Contents/Info.plist
82                 fi
83                 ${SED} -i -e s/0.0.0/${cola_version}/ ${cola_app}/Contents/Info.plist
84                 ${CP} contrib/darwin/git-cola ${cola_app}/Contents/MacOS
85                 ${CP} contrib/darwin/git-cola.icns ${cola_app}/Contents/Resources
86                 ${GARDEN} -vv -D prefix=${cola_app_resources} install
87                 ${GARDEN} -vv doc
88                 ${GARDEN} -vv -D prefix=${cola_app_resources} install docs
89             man: ${GARDEN} -vv man docs
90             po: |
91                 for po in cola/i18n/*.po
92                 do
93                     ${MSGMERGE} \
94                         --no-wrap \
95                         --no-fuzzy-matching \
96                         --sort-output \
97                         --output-file $$po.new \
98                         $$po \
99                         cola/i18n/git-cola.pot
100                     mv $$po.new $$po
101                 done
102             pot: |
103                 ${XGETTEXT} \
104                     --language=Python \
105                     --keyword=N_ \
106                     --no-wrap \
107                     --omit-header \
108                     --sort-output \
109                     --output-dir cola/i18n \
110                     --output git-cola.pot \
111                     cola/*.py \
112                     cola/*/*.py
113             pages<: doc
114             pages: ${GARDEN} -vv -D prefix=${TREE_PATH}/pages install docs "$@"
115             run: ${activate} ./bin/git-cola "$@"
116             run/qt6: ${activate} QT_API=PyQt6 ./bin/git-cola "$@"
117             test: ${activate} ${PYTEST_CMD} cola test "$@"
118             tox: ${TOX} run "$@"
119             tox/check: ${TOX} run -e check "$@"
120         gitconfig:
121             remote.publish.pushurl:
122                 - "git@gitlab.com:git-cola/git-cola.git"
123                 - "git@github.com:git-cola/git-cola.git"
124         remotes:
125             BaumiCoder: "https://github.com/BaumiCoder/git-cola.git"
126             DasaniT: "https://github.com/DasaniT/git-cola.git"
127             Mailaender: "https://github.com/Mailaender/git-cola.git"
128             Mithil467: "https://github.com/Mithil467/git-cola.git"
129             NielBuys: "https://github.com/NielBuys/git-cola.git"
130             WNguyen14: "https://github.com/WNguyen14/git-cola.git"
131             abid1998: "https://github.com/abid1998/git-cola.git"
132             achernet: "https://github.com/achernet/git-cola.git"
133             axel-h: "https://github.com/axel-h/git-cola.git"
134             bearsh: "https://github.com/bearsh/git-cola.git"
135             bensmrs: "https://github.com/bensmrs/git-cola.git"
136             bobvanderlinden: "https://github.com/bobvanderlinden/git-cola.git"
137             brccabral: "https://github.com/brccabral/git-cola.git"
138             davvid: "git@github.com:davvid/git-cola.git"
139             dschwoerer: "https://github.com/dschwoerer/git-cola.git"
140             florisla: "https://github.com/florisla/git-cola.git"
141             fu7mu4: "https://github.com/fu7mu4/git-cola.git"
142             gdebure: "https://github.com/gdebure/git-cola.git"
143             github: "git@github.com:git-cola/git-cola.git"
144             guoyunhe: "https://github.com/guoyunhe/git-cola.git"
145             gyuris: "https://github.com/gyuris/git-cola.git"
146             haffmans: "https://github.com/haffmans/git-cola.git"
147             harmathy: "https://github.com/harmathy/git-cola.git"
148             hsoft: "https://github.com/hsoft/git-cola.git"
149             jamie-pate: "https://github.com/jamie-pate/git-cola.git"
150             kenyuy: "https://github.com/kenyuy/git-cola.git"
151             kisaragi-hiu: "https://github.com/kisaragi-hiu/git-cola.git"
152             kneirinck: "https://github.com/kneirinck/git-cola.git"
153             kurtmckee: "https://github.com/kurtmckee/git-cola.git"
154             laerreal: "https://github.com/laerreal/git-cola.git"
155             lah7: "https://github.com/lah7/git-cola.git"
156             living180: "https://github.com/living180/git-cola.git"
157             ljhcage: "https://github.com/ljhcage/git-cola.git"
158             malpas: "https://github.com/malpas/git-cola.git"
159             melkecelioglu: "https://github.com/melkecelioglu/git-cola.git"
160             milestone12: "https://github.com/milestone12/git-cola.git"
161             mmargoliono: "https://github.com/mmargoliono/git-cola"
162             mp-chet: "https://github.com/mp-chet/git-cola.git"
163             nakanoi: "https://github.com/nakanoi/git-cola.git"
164             nandalopes: "https://github.com/nandalopes/git-cola.git"
165             OriShalhon: "https://github.com/OriShalhon/git-cola.git"
166             pilarmolinalopez: "https://github.com/pilarmolinalopez/git-cola.git"
167             quintusfelix: "https://github.com/quintusfelix/git-cola.git"
168             rafaelreuber: "https://github.com/rafaelreuber/git-cola.git"
169             scop: "https://github.com/scop/git-cola.git"
170             sergei-dyshel: "https://github.com/sergei-dyshel/git-cola.git"
171             sthalik: "https://github.com/sthalik/git-cola.git"
172             skunkwerks: "https://github.com/skunkwerks/git-cola.git"
173             takluyver: "https://github.com/takluyver/git-cola.git"
174             thk123: "https://github.com/thk123/git-cola.git"
175             timgates42: "https://github.com/timgates42/git-cola.git"
176             vdragon: "https://github.com/Vdragon/git-cola.git"
177             victorhck: "https://github.com/victorhck/git-cola.git"
178             virtualstaticvoid: "https://github.com/virtualstaticvoid/git-cola.git"
179             wm4: "https://github.com/wm4/git-cola.git"
180             wojnilowicz: "https://github.com/wojnilowicz/git-cola.git"
181             yaellevy: "https://github.com/yaellevy/git-cola.git"
182     deb:
183         description: Debian packaging
184         url: "git@gitlab.com:git-cola/git-cola-debian.git"
185         remotes:
186             davvid: "git@github.com:davvid/git-cola-debian.git"
187     docs:
188         description: Sphinx documentation
189         variables:
190         env_dir: ../env3
191         commands:
192         clean: rm -fr _build
193         doctest: ${activate} ${SPHINX_CMD} -b doctest . _build/doctest "$@"
194         html: ${activate} ${SPHINX_CMD} -b html . _build/html "$@"
195         man: ${activate} ${SPHINX_CMD} -b man . _build/man "$@"
196         linkcheck: ${activate} ${SPHINX_CMD} -b linkcheck . _build/linkcheck "$@"
197         install: |
198             ${MKDIR_P} ${DESTDIR}${docdir}
199             ${INSTALL} -m 644 *.html ${DESTDIR}${docdir}
200             ${INSTALL} -m 644 *.rst ${DESTDIR}${docdir}
201             # HTML documentation
202             ${MKDIR_P} ${DESTDIR}${htmldir}
203             ${RSYNC_CMD} _build/html/ ${DESTDIR}${htmldir}/
204             # Manual pages
205             ${MKDIR_P} ${DESTDIR}${mandir}
206             ${INSTALL} -m 644 _build/man/git-cola.1 ${DESTDIR}${mandir}
207             ${INSTALL} -m 644 _build/man/git-dag.1 ${DESTDIR}${mandir}
208     fedora:
209         description: Fedora packaging
210         url: "https://src.fedoraproject.org/rpms/git-cola.git"
211         remotes:
212             git-cola: "git@gitlab.com:git-cola/git-cola-fedora.git"
213             davvid: "git@github.com:davvid/git-cola-fedora.git"
214     flatpak:
215         description: Flatpak packaging
216         url: "git@github.com:flathub/com.github.git_cola.git-cola.git"
217         variables:
218             app-id: com.github.git_cola.git-cola
219         commands:
220             build: flatpak-builder "$@" --user "${prefix}" ${app-id}.yml
221             check: |
222                 flatpak run --command=flatpak-builder-lint \
223                     org.flatpak.Builder "$@" --exceptions builddir "${prefix}"
224             install: flatpak-builder "$@" --install --user "${prefix}" ${app-id}.yml
225             run: flatpak run ${app-id}
226             setup: |
227                 flatpak remote-add --user --if-not-exists \
228                 flathub https://flathub.org/repo/flathub.flatpakrepo
229                 flatpak install --user \
230                 org.flatpak.Builder/x86_64 \
231                 org.kde.Sdk/x86_64/5.15-23.08 \
232                 org.kde.Platform/x86_64/5.15-23.08 \
233                 com.riverbankcomputing.PyQt.BaseApp/x86_64/5.15-23.08
234     pages:
235         description: "Git Cola's homepage"
236         url: "git@gitlab.com:git-cola/git-cola.gitlab.io.git"
237         remotes:
238             github: "git@github.com:git-cola/git-cola.github.io.git"
239             ls-jad-elkik: "git://github.com/ls-jad-elkik/git-cola.github.io.git"
240             lz-coder: "https://github.com/lz-coder/git-cola.github.io.git"
241         gitconfig:
242             remote.origin.pushurl:
243                 - "git@gitlab.com:git-cola/git-cola.gitlab.io.git"
244                 - "git@github.com:git-cola/git-cola.github.io.git"
245         commands:
246             build: ${JEKYLL} build --destination build "$@"
247         links:
248             - "https://git-cola.gitlab.io"
249             - "https://git-cola.github.io"
251 commands:
252     commit: git commit "$@"
253     diff: git diff "$@"
254     diffs: git diff --staged "$@"
255     fetch: git fetch "$@"
256     stat: git status --short "$@"
257     status: git status "$@"
258     stage: git add -u "$@"
259     push: git push "$@"
260     pull: git pull --ff-only "$@"
262 # Variables can be overridden externally using "garden -D name=value ...".
263 variables:
264     # Traditional DESTDIR + prefix variables
265     DESTDIR: ""
266     prefix: ${GARDEN_CONFIG_DIR}/dist
267     docdir: ${prefix}/share/doc/git-cola
268     htmldir: ${docdir}/html
269     mandir: ${prefix}/share/man/man1
270     cola_app: ${TREE_PATH}/git-cola.app
271     cola_app_resources: ${cola_app}/Contents/Resources
272     cola_full_version: $ ./bin/git-cola version --brief
273     cola_version: $ ${SED} -e "s/VERSION = '\(.*\)'/\1/"  cola/_version.py
274     is_virtualenv: |
275         $ ${PYTHON} -c '
276         import os, sys
277         if sys.prefix != sys.base_prefix or os.environ.get("VIRTUAL_ENV"):
278             print("true")
279         '
280     env_dir: env3
281     activate: |
282         if test -z "${is_virtualenv}" && test -f "${env_dir}/bin/activate"
283         then
284             source "${env_dir}/bin/activate"
285         fi
286     # External commands and options
287     CERCIS: cercis
288     CP: cp
289     GARDEN: garden
290     GIT: git
291     GREP: grep
292     INSTALL: install
293     JEKYLL: jekyll
294     MKDIR_P: mkdir -p
295     MSGMERGE: msgmerge
296     PIP: pip
297     PYTEST: ${activate} ${PYTHON} -B -m pytest
298     PYTEST_OPTIONS: |
299         $ test "$(uname -s)" != "Linux" && printf '%s' --ignore=cola/inotify.py
300     PYTEST_CMD: ${PYTEST} ${PYTEST_OPTIONS}
301     PYTHON: python3
302     RSYNC: rsync
303     RSYNC_CMD: ${RSYNC} -r --delete --exclude=.buildinfo
304     SED: sed
305     SPHINX: ${PYTHON} -m sphinx
306     SPHINX_CMD: ${SPHINX} -d _build/doctrees -a
307     TOX: tox
308     XARGS: xargs
309     XGETTEXT: xgettext
311 # vim: tabstop=4 softtabstop=4 shiftwidth=4 expandtab