# Template file for 'yadm'
pkgname=yadm
version=3.4.0
revision=1
depends="bash git gnupg"
checkdepends="${depends/bash /} python3-pytest esh expect tar"
short_desc="Yet Another Dotfiles Manager"
maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
license="GPL-3.0-or-later"
homepage="https://yadm.io/"
changelog="https://raw.githubusercontent.com/yadm-dev/yadm/refs/heads/master/CHANGES"
distfiles="https://github.com/TheLocehiliosan/yadm/archive/${version}.tar.gz"
checksum=fb0ab375cc41a34e014fb4a34c65f12670aedc859823b943f626adff24bde95d

do_install() {
	vbin yadm
	vman yadm.1
	vcompletion completion/bash/yadm bash
	vcompletion completion/fish/yadm.fish fish
	vcompletion completion/zsh/_yadm zsh
}

do_check() {
	# skip tests for template engines we don't support
	# test_syntax.py needs specific versions of linters, skip
	# test_upgrade.py needs old versions of yadm
	pytest -k 'not((-envtpl])or(-j2])or(-j2cli]))' \
		--ignore test/test_unit_template_j2.py \
		--ignore test/test_syntax.py \
		--ignore test/test_upgrade.py \
		--deselect test/test_encryption.py::test_offer_to_add
}
