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