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