1 # Use "cargo install garden-tools" to install garden https://gitlab.com/garden-rs/garden
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
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 docs into the pages/ website sources.
20 # garden build pages # Generate the pages/ website from the html templates.
23 # garden macos/app # Build a git-cola.app bundle
26 # garden grow pages # Clone the Git Cola homepage
27 # garden grow fedora # Clone the Fedora packaging
28 # garden grow deb # Clone the Debian packaging
29 # garden grow flatpak # Clone the Flatpak packaging
32 description: The highly-caffeinated Git GUI
33 path: "${GARDEN_CONFIG_DIR}"
34 url: "git@gitlab.com:git-cola/git-cola.git"
36 clean: rm -rf build dist git_cola.egg-info git-cola-*.windows.zip
37 doc: garden ${GARDEN_CMD_VERBOSE} cmd docs html man -- "$@"
38 dev: ${PYTHON} -m venv --system-site-packages ${env_dir}
43 dev/build: ${activate} pip install --editable '.[build]'
44 dev/development: ${activate} pip install --editable '.[docs,dev,testing]'
45 dev/extras: ${activate} pip install --editable '.[extras]'
46 dev/pyqt6: ${activate} pip install --editable '.[pyqt6]'
47 dev/install: ${activate} pip install --editable .
48 dev/env: ${activate} "$@"
53 check/fmt: garden fmt -- --check
57 git ls-files -- '*.py' |
60 html: garden ${GARDEN_CMD_VERBOSE} html docs
62 if test -n "${DESTDIR}"
64 pip_root="--root=${DESTDIR}"
65 export DESTDIR="${DESTDIR}"
67 pip install --disable-pip-version-check $pip_root --prefix="${prefix}" "$@" .
72 mkdir -p ${cola_app}/Contents/MacOS
73 mkdir -p ${cola_app_resources}
74 ${PYTHON} -m venv ${cola_app_resources}
75 source ${cola_app_resources}/bin/activate
76 pip install '.[docs,extras,pyqt6]'
77 cp contrib/darwin/Info.plist contrib/darwin/PkgInfo ${cola_app}/Contents
78 if test -n "${cola_full_version}"
80 sed -i -e s/0.0.0.0/${cola_full_version}/ ${cola_app}/Contents/Info.plist
82 sed -i -e s/0.0.0/${cola_version}/ ${cola_app}/Contents/Info.plist
83 cp contrib/darwin/git-cola ${cola_app}/Contents/MacOS
84 cp contrib/darwin/git-cola.icns ${cola_app}/Contents/Resources
85 garden ${GARDEN_CMD_VERBOSE} -D prefix=${cola_app_resources} install
86 garden ${GARDEN_CMD_VERBOSE} doc
87 garden ${GARDEN_CMD_VERBOSE} -D prefix=${cola_app_resources} install docs
88 man: garden ${GARDEN_CMD_VERBOSE} man docs
90 for po in cola/i18n/*.po
96 --output-file $$po.new \
98 cola/i18n/git-cola.pot
108 --output-dir cola/i18n \
109 --output git-cola.pot \
113 pages: garden ${GARDEN_CMD_VERBOSE} -D prefix=${TREE_PATH}/pages install docs "$@"
116 twine upload --sign dist/*.whl dist/*.tar.gz
117 run: ${activate} ./bin/git-cola "$@"
118 run/qt6: ${activate} QT_API=PyQt6 ./bin/git-cola "$@"
119 test: ${activate} ${PYTEST} cola test "$@"
121 tox/check: tox run -e check "$@"
122 wheel: ${activate} python3 -m build -n .
124 remote.publish.pushurl:
125 - "git@gitlab.com:git-cola/git-cola.git"
126 - "git@github.com:git-cola/git-cola.git"
128 abid1998: "git@github.com:abid1998/git-cola.git"
129 achernet: "git@github.com:achernet/git-cola.git"
130 axel-h: "git@github.com:axel-h/git-cola.git"
131 BaumiCoder: "git@github.com:BaumiCoder/git-cola.git"
132 bearsh: "git@github.com:bearsh/git-cola.git"
133 bensmrs: "git@github.com:bensmrs/git-cola.git"
134 bobvanderlinden: "git@github.com:bobvanderlinden/git-cola.git"
135 brccabral: "git@github.com:brccabral/git-cola.git"
136 DasaniT: "git@github.com:DasaniT/git-cola.git"
137 davvid: "git@github.com:davvid/git-cola.git"
138 dschwoerer: "git@github.com:dschwoerer/git-cola.git"
139 florisla: "git@github.com:florisla/git-cola.git"
140 fu7mu4: "git@github.com:fu7mu4/git-cola.git"
141 gdebure: "git@github.com:gdebure/git-cola.git"
142 github: "git@github.com:git-cola/git-cola.git"
143 guoyunhe: "git@github.com:guoyunhe/git-cola.git"
144 gyuris: "git@github.com:gyuris/git-cola.git"
145 haffmans: "git@github.com:haffmans/git-cola.git"
146 harmathy: "git@github.com:harmathy/git-cola.git"
147 hsoft: "git@github.com:hsoft/git-cola.git"
148 jamie-pate: "git@github.com:jamie-pate/git-cola.git"
149 kenyuy: "git@github.com:kenyuy/git-cola.git"
150 kisaragi-hiu: "git@github.com:kisaragi-hiu/git-cola.git"
151 kneirinck: "git@github.com:kneirinck/git-cola.git"
152 kurtmckee: "git@github.com:kurtmckee/git-cola.git"
153 laerreal: "git@github.com:laerreal/git-cola.git"
154 lah7: "git@github.com:lah7/git-cola.git"
155 lefairy: "git@github.com:lefairy/git-cola.git"
156 living180: "git@github.com:living180/git-cola.git"
157 ljhcage: "git@github.com:ljhcage/git-cola.git"
158 Mailaender: "git@github.com:Mailaender/git-cola.git"
159 malpas: "git@github.com:malpas/git-cola.git"
160 melkecelioglu: "git@github.com:melkecelioglu/git-cola.git"
161 milestone12: "git@github.com:milestone12/git-cola.git"
162 Mithil467: "git@github.com:Mithil467/git-cola.git"
163 mmargoliono: "git@github.com:mmargoliono/git-cola"
164 mp-chet: "git@github.com:mp-chet/git-cola.git"
165 nakanoi: "git@github.com:nakanoi/git-cola.git"
166 nandalopes: "git@github.com:nandalopes/git-cola.git"
167 NielBuys: "git@github.com:NielBuys/git-cola.git"
168 OriShalhon: "git@github.com:OriShalhon/git-cola.git"
169 pilarmolinalopez: "git@github.com:pilarmolinalopez/git-cola.git"
170 quintusfelix: "git@github.com:quintusfelix/git-cola.git"
171 rafaelreuber: "git@github.com:rafaelreuber/git-cola.git"
172 scop: "git@github.com:scop/git-cola.git"
173 sergei-dyshel: "git@github.com:sergei-dyshel/git-cola.git"
174 skunkwerks: "git@github.com:skunkwerks/git-cola.git"
175 sthalik: "git@github.com:sthalik/git-cola.git"
176 takluyver: "git@github.com:takluyver/git-cola.git"
177 thk123: "git@github.com:thk123/git-cola.git"
178 timgates42: "git@github.com:timgates42/git-cola.git"
179 vdragon: "git@github.com:Vdragon/git-cola.git"
180 victorhck: "git@github.com:victorhck/git-cola.git"
181 virtualstaticvoid: "git@github.com:virtualstaticvoid/git-cola.git"
182 VishnuSanal: "git@github.com:VishnuSanal/git-cola.git"
183 wm4: "git@github.com:wm4/git-cola.git"
184 WNguyen14: "git@github.com:WNguyen14/git-cola.git"
185 wojnilowicz: "git@github.com:wojnilowicz/git-cola.git"
186 yaellevy: "git@github.com:yaellevy/git-cola.git"
188 description: Debian packaging
189 url: "git@gitlab.com:git-cola/git-cola-debian.git"
191 davvid: "git@github.com:davvid/git-cola-debian.git"
193 description: Sphinx documentation
198 doctest: ${activate} ${SPHINX} -b doctest . _build/doctest "$@"
199 html: ${activate} ${SPHINX} -b html . _build/html "$@"
200 man: ${activate} ${SPHINX} -b man . _build/man "$@"
201 linkcheck: ${activate} ${SPHINX} -b linkcheck . _build/linkcheck "$@"
203 mkdir -p "${DESTDIR}${docdir}"
204 install -m 644 *.html "${DESTDIR}${docdir}"
205 install -m 644 *.rst "${DESTDIR}${docdir}"
207 mkdir -p "${DESTDIR}${htmldir}"
208 rsync -r --delete --exclude=.buildinfo _build/html/ "${DESTDIR}${htmldir}/"
210 mkdir -p "${DESTDIR}${mandir}"
211 install -m 644 _build/man/git-cola.1 "${DESTDIR}${mandir}"
212 install -m 644 _build/man/git-dag.1 "${DESTDIR}${mandir}"
214 description: Fedora packaging
215 url: "https://src.fedoraproject.org/rpms/git-cola.git"
217 git-cola: "git@gitlab.com:git-cola/git-cola-fedora.git"
218 davvid: "git@github.com:davvid/git-cola-fedora.git"
220 description: Flatpak packaging
221 url: "git@github.com:flathub/com.github.git_cola.git-cola.git"
223 app-id: com.github.git_cola.git-cola
225 build: flatpak-builder "$@" --user "${prefix}" "${app-id}.yml"
227 flatpak run --command=flatpak-builder-lint \
228 org.flatpak.Builder "$@" --exceptions builddir "${prefix}"
229 install: flatpak-builder "$@" --install --user "${prefix}" "${app-id}.yml"
230 run: flatpak run ${app-id}
232 flatpak remote-add --user --if-not-exists \
233 flathub https://flathub.org/repo/flathub.flatpakrepo
234 flatpak install --user \
235 org.flatpak.Builder/x86_64 \
236 org.kde.Sdk/x86_64/5.15-23.08 \
237 org.kde.Platform/x86_64/5.15-23.08 \
238 com.riverbankcomputing.PyQt.BaseApp/x86_64/5.15-23.08
240 description: "Git Cola's homepage"
241 url: "git@gitlab.com:git-cola/git-cola.gitlab.io.git"
243 github: "git@github.com:git-cola/git-cola.github.io.git"
244 ls-jad-elkik: "git://github.com/ls-jad-elkik/git-cola.github.io.git"
245 lz-coder: "https://github.com/lz-coder/git-cola.github.io.git"
247 remote.origin.pushurl:
248 - "git@gitlab.com:git-cola/git-cola.gitlab.io.git"
249 - "git@github.com:git-cola/git-cola.github.io.git"
252 container-image: "jekyll/minimal:latest"
254 build: jekyll build --destination "${prefix}" "$@"
258 garden build ${GARDEN_CMD_VERBOSE} "$@"
259 inotifywait --event=close_write --recursive "${TREE_PATH}"
262 uid=$${UID:-$(id -u)}
263 gid=$${GID:-$(id -g)}
269 --userns keep-id:uid=$uid,gid=$gid \
270 --volume="${TREE_PATH}:/srv/jekyll" \
271 --workdir "${TREE_PATH}" \
272 "${container-image}" \
273 jekyll build --destination "${prefix}" "$@"
274 sanitize: dos2unix share/doc/git-cola/*.html share/doc/git-cola/html/*.html
275 setup: sudo apt install inotify-tools jekyll
277 - "https://git-cola.gitlab.io"
278 - "https://git-cola.github.io"
280 description: Maintainer scripts and notes
285 commit: git commit "$@"
287 diffs: git diff --staged "$@"
288 fetch: git fetch "$@"
289 stat: git status --short "$@"
290 status: git status "$@"
291 stage: git add -u "$@"
293 pull: git pull --ff-only "$@"
295 # Variables can be overridden externally using "garden -D name=value ...".
297 # DESTDIR + prefix variables: https://www.gnu.org/software/make/manual/html_node/DESTDIR.html
299 prefix: ${GARDEN_CONFIG_DIR}/dist
300 docdir: ${prefix}/share/doc/git-cola
301 htmldir: ${docdir}/html
302 mandir: ${prefix}/share/man/man1
303 cola_app: ${TREE_PATH}/git-cola.app
304 cola_app_resources: ${cola_app}/Contents/Resources
305 cola_full_version: $ ./bin/git-cola version --brief --builtin
306 cola_version: $ sed -e "s/VERSION = '\(.*\)'/\1/" cola/_version.py
310 if sys.prefix != sys.base_prefix or os.environ.get("VIRTUAL_ENV"):
315 if test -z "${is_virtualenv}" && test -f "${env_dir}/bin/activate"
317 source "${env_dir}/bin/activate"
319 # External commands and options
320 PYTEST: ${PYTHON} -B -m pytest ${PYTEST_OPTIONS}
321 PYTEST_OPTIONS: $ test "$(uname -s)" != Linux && printf '%s' --ignore=cola/inotify.py
323 SPHINX: ${PYTHON} -m sphinx -d _build/doctrees -a