docs: spelling corrections and commentary tweaks
[git-cola.git] / garden.yaml
blob7c88b195db179abc4afaf4019d03e42c7aa4e12d
1 # Use "cargo install garden-tools" to install garden https://gitlab.com/garden-rs/garden
3 # Usage:
5 #   # Development Workflows
6 #   garden test                 # Run the test suite
7 #   garden fmt                  # Format code using "cercis"
8 #   garden doc                  # Generate documentation: html + manual pages
9 #   garden html                 # Generate documentation: html only
10 #   garden man                  # Generate documentation: manual pages only
11 #   garden pot                  # Regenerate git-cola.pot with new translations
12 #   garden po                   # Update .po files with new translations from git-cola.pot
13 #   garden pages                # Install the pages/ website documentation.
15 #   # Installation
16 #   garden install              # Install git-cola to the installation ${prefix}
17 #   garden install docs         # Install documentation
19 #   # Development
20 #   garden dev                  # Create a virtualenv for development in "env3".
22 #   # Variables can be overridden using "-D name=value", e.g.:
23 #   garden -D DESTDIR=/tmp/stage -D prefix=/usr/local install
24 #   garden -D prefix=$PWD/dist install docs
26 #   # macOS
27 #   garden macos/app            # Build a git-cola.app bundle
29 #   # Related Projects
30 #   garden grow pages           # Clone the Git Cola homepage
31 #   garden grow fedora          # Clone the Fedora packaging
32 #   garden grow deb             # Clone the Debian packaging
33 ---
34 garden:
35   root: "${GARDEN_CONFIG_DIR}"
37 trees:
38   git-cola:
39     description: The highly-caffeinated Git GUI
40     path: "${GARDEN_CONFIG_DIR}"
41     url: "git@gitlab.com:git-cola/git-cola.git"
42     commands:
43       doc: garden -vv cmd docs html man
44       dev: ${PYTHON} -m venv --system-site-packages env3
45       dev>:
46         - dev/extras
47         - dev/development
48         - dev/build
49       dev/build: |
50         test -f env3/bin/activate && source env3/bin/activate || true
51         ${PIP} install --editable '.[build]'
52       dev/dev: |
53         test -f env3/bin/activate && source env3/bin/activate || true
54         ${PIP} install --editable '.[docs,dev]'
55       dev/extras: |
56         test -f env3/bin/activate && source env3/bin/activate || true
57         ${PIP} install --editable '.[extras]'
58       dev/pyqt6: |
59         test -f env3/bin/activate && source env3/bin/activate || true
60         ${PIP} install --editable '.[pyqt6]'
61       check>:
62         - test
63         - doc
64         - pylint
65       fmt: |
66         ${CERCIS} --version
67         ${GIT} ls-files -- '*.py' |
68         ${GREP} -v ^qtpy |
69         ${XARGS} ${CERCIS} "$@"
70       html: garden -vv html docs
71       install: |
72         if test -n "${DESTDIR}"
73         then
74             pip_root="--root=${DESTDIR}"
75             export DESTDIR="${DESTDIR}"
76         fi
77         ${PIP} install --disable-pip-version-check $pip_root --prefix=${prefix} "$@" .
78       i18n>:
79         - pot
80         - po
81       macos/app: |
82         ${MKDIR_P} ${cola_app}/Contents/MacOS
83         ${MKDIR_P} ${cola_app_resources}
84         ${PYTHON} -m venv ${cola_app_resources}
85         source ${cola_app_resources}/bin/activate
86         pip install '.[docs,extras,pyqt6]'
87         ${CP} contrib/darwin/Info.plist contrib/darwin/PkgInfo ${cola_app}/Contents
88         if test -n "${cola_full_version}"
89         then
90             ${SED} -i -e s/0.0.0.0/${cola_full_version}/ ${cola_app}/Contents/Info.plist
91         fi
92         ${SED} -i -e s/0.0.0/${cola_version}/ ${cola_app}/Contents/Info.plist
93         ${CP} contrib/darwin/git-cola ${cola_app}/Contents/MacOS
94         ${CP} contrib/darwin/git-cola.icns ${cola_app}/Contents/Resources
95         garden -vv -D prefix=${cola_app_resources} install
96         garden -vv doc
97         garden -vv -D prefix=${cola_app_resources} install docs
98       man: garden -vv man docs
99       po: |
100         for po in cola/i18n/*.po
101         do
102             ${MSGMERGE} \
103                 --no-wrap \
104                 --no-fuzzy-matching \
105                 --sort-output \
106                 --output-file $$po.new \
107                 $$po \
108                 cola/i18n/git-cola.pot
109             mv $$po.new $$po
110         done
111       pot: |
112         ${XGETTEXT} \
113             --language=Python \
114             --keyword=N_ \
115             --no-wrap \
116             --omit-header \
117             --sort-output \
118             --output-dir cola/i18n \
119             --output git-cola.pot \
120             cola/*.py \
121             cola/*/*.py
122       pages: garden -vv -D prefix=${TREE_PATH}/pages install docs
123       pylint: |
124         ${PYLINT} --version
125         ${PYLINT} --rcfile=.pylintrc ${PYLINT_OPTIONS} "$@" cola test
126       test: ${PYTEST} ${PYTEST_OPTIONS} -p no:cacheprovider "$@" cola test
127       tox: ${TOX} run "$@"
128       tox/check: ${TOX} run -e check "$@"
129     remotes:
130       BaumiCoder: "https://github.com/BaumiCoder/git-cola.git"
131       DasaniT: "https://github.com/DasaniT/git-cola.git"
132       Mailaender: "https://github.com/Mailaender/git-cola.git"
133       Mithil467: "https://github.com/Mithil467/git-cola.git"
134       NielBuys: "https://github.com/NielBuys/git-cola.git"
135       WNguyen14: "https://github.com/WNguyen14/git-cola.git"
136       abid1998: "https://github.com/abid1998/git-cola.git"
137       achernet: "https://github.com/achernet/git-cola.git"
138       axel-h: "https://github.com/axel-h/git-cola.git"
139       bearsh: "https://github.com/bearsh/git-cola.git"
140       bensmrs: "https://github.com/bensmrs/git-cola.git"
141       bobvanderlinden: "https://github.com/bobvanderlinden/git-cola.git"
142       brccabral: "https://github.com/brccabral/git-cola.git"
143       davvid: "git@github.com:davvid/git-cola.git"
144       dschwoerer: "https://github.com/dschwoerer/git-cola.git"
145       florisla: "https://github.com/florisla/git-cola.git"
146       fu7mu4: "https://github.com/fu7mu4/git-cola.git"
147       gdebure: "https://github.com/gdebure/git-cola.git"
148       github: "git@github.com:git-cola/git-cola.git"
149       guoyunhe: "https://github.com/guoyunhe/git-cola.git"
150       gyuris: "https://github.com/gyuris/git-cola.git"
151       haffmans: "https://github.com/haffmans/git-cola.git"
152       harmathy: "https://github.com/harmathy/git-cola.git"
153       hsoft: "https://github.com/hsoft/git-cola.git"
154       jamie-pate: "https://github.com/jamie-pate/git-cola.git"
155       kenyuy: "https://github.com/kenyuy/git-cola.git"
156       kisaragi-hiu: "https://github.com/kisaragi-hiu/git-cola.git"
157       kneirinck: "https://github.com/kneirinck/git-cola.git"
158       kurtmckee: "https://github.com/kurtmckee/git-cola.git"
159       laerreal: "https://github.com/laerreal/git-cola.git"
160       lah7: "https://github.com/lah7/git-cola.git"
161       living180: "https://github.com/living180/git-cola.git"
162       ljhcage: "https://github.com/ljhcage/git-cola.git"
163       malpas: "https://github.com/malpas/git-cola.git"
164       melkecelioglu: "https://github.com/melkecelioglu/git-cola.git"
165       milestone12: "https://github.com/milestone12/git-cola.git"
166       mmargoliono: "https://github.com/mmargoliono/git-cola"
167       mp-chet: "https://github.com/mp-chet/git-cola.git"
168       nakanoi: "https://github.com/nakanoi/git-cola.git"
169       nandalopes: "https://github.com/nandalopes/git-cola.git"
170       OriShalhon: "https://github.com/OriShalhon/git-cola.git"
171       pilarmolinalopez: "https://github.com/pilarmolinalopez/git-cola.git"
172       quintusfelix: "https://github.com/quintusfelix/git-cola.git"
173       rafaelreuber: "https://github.com/rafaelreuber/git-cola.git"
174       scop: "https://github.com/scop/git-cola.git"
175       sergei-dyshel: "https://github.com/sergei-dyshel/git-cola.git"
176       sthalik: "https://github.com/sthalik/git-cola.git"
177       skunkwerks: "https://github.com/skunkwerks/git-cola.git"
178       takluyver: "https://github.com/takluyver/git-cola.git"
179       thk123: "https://github.com/thk123/git-cola.git"
180       timgates42: "https://github.com/timgates42/git-cola.git"
181       vdragon: "https://github.com/Vdragon/git-cola.git"
182       victorhck: "https://github.com/victorhck/git-cola.git"
183       virtualstaticvoid: "https://github.com/virtualstaticvoid/git-cola.git"
184       wm4: "https://github.com/wm4/git-cola.git"
185       wojnilowicz: "https://github.com/wojnilowicz/git-cola.git"
186       yaellevy: "https://github.com/yaellevy/git-cola.git"
187   deb:
188     description: Debian packaging
189     url: "git@gitlab.com:git-cola/git-cola-debian.git"
190     remotes:
191       davvid: "git@github.com:davvid/git-cola-debian.git"
192   docs:
193     description: Sphinx documentation
194     commands:
195       clean: rm -fr _build
196       doctest: ${SPHINXBUILD} -b doctest ${SPHINX_OPTIONS} _build/doctest
197       html: ${SPHINXBUILD} -b html ${SPHINX_OPTIONS} _build/html
198       man: ${SPHINXBUILD} -b man ${SPHINX_OPTIONS} _build/man
199       linkcheck: ${SPHINXBUILD} -b linkcheck ${SPHINX_OPTIONS} _build/linkcheck
200       install: |
201         ${MKDIR_P} ${DESTDIR}${docdir}
202         ${INSTALL} -m 644 *.html ${DESTDIR}${docdir}
203         ${INSTALL} -m 644 *.rst ${DESTDIR}${docdir}
204         # HTML documentation
205         ${MKDIR_P} ${DESTDIR}${htmldir}
206         ${RSYNC} ${RSYNC_OPTIONS} _build/html/ ${DESTDIR}${htmldir}/
207         # Manual pages
208         ${MKDIR_P} ${DESTDIR}${mandir}
209         ${INSTALL} -m 644 _build/man/git-cola.1 ${DESTDIR}${mandir}
210         ${INSTALL} -m 644 _build/man/git-dag.1 ${DESTDIR}${mandir}
211   fedora:
212     description: Fedora packaging
213     url: "https://src.fedoraproject.org/rpms/git-cola.git"
214     remotes:
215       git-cola: "git@gitlab.com:git-cola/git-cola-fedora.git"
216       davvid: "git@github.com:davvid/git-cola-fedora.git"
217   pages:
218     description: "Git Cola's homepage"
219     url: "git@gitlab.com:git-cola/git-cola.gitlab.io.git"
220     remotes:
221       github: "git@github.com:git-cola/git-cola.github.io.git"
222       ls-jad-elkik: "git://github.com/ls-jad-elkik/git-cola.github.io.git"
223       lz-coder: "https://github.com/lz-coder/git-cola.github.io.git"
224     links:
225       - "https://git-cola.gitlab.io"
226       - "https://git-cola.github.io"
228 # Variables can be overridden externally using "garden -D name=value ...".
229 variables:
230   # Traditional DESTDIR + prefix variables
231   DESTDIR: ""
232   prefix: ${GARDEN_CONFIG_DIR}/dist
233   docdir: ${prefix}/share/doc/git-cola
234   htmldir: ${docdir}/html
235   mandir: ${prefix}/share/man/man1
236   cola_app: ${TREE_PATH}/git-cola.app
237   cola_app_resources: ${cola_app}/Contents/Resources
238   cola_full_version: $ ./bin/git-cola version --brief
239   cola_version: $ sed -e "s/VERSION = '\(.*\)'/\1/"  cola/_version.py
240   # External commands and options
241   CERCIS: cercis
242   CP: cp
243   GIT: git
244   GREP: grep
245   INSTALL: install
246   MKDIR_P: mkdir -p
247   MSGMERGE: msgmerge
248   PIP: pip
249   PYLINT: ${PYTHON} -B -m pylint
250   PYLINT_OPTIONS: $ ${PYLINT} --score=no --help >/dev/null 2>&1 && printf '%s' --score=no
251   PYTEST: ${PYTHON} -B -m pytest
252   PYTEST_OPTIONS: $ test "$(uname -s)" != "Linux" && printf '%s' --ignore=cola/inotify.py
253   PYTHON: python3
254   RSYNC: rsync
255   RSYNC_OPTIONS: "-r --delete --exclude=.buildinfo"
256   SED: sed
257   SPHINXBUILD: sphinx-build
258   SPHINX_OPTIONS: "-d _build/doctrees -a ."
259   TOX: tox
260   XARGS: xargs
261   XGETTEXT: xgettext