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