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