# Maintainer: Robin Candau <antiz@archlinux.org>

pkgname=python-hatch-regex-commit
_pkgname=${pkgname#python-}
pkgver=0.0.4
pkgrel=2
pkgdesc="Hatch plugin to create a commit and tag when bumping version"
url="https://github.com/frankie567/hatch-regex-commit"
arch=('any')
license=('MIT')
depends=('python' 'python-hatch')
makedepends=('git' 'python-build' 'python-installer' 'python-wheel')
source=("git+${url}#tag=v${pkgver}?signed")
sha256sums=('66638e723e039171c2689704d7ed550680746c04c0023c4532a21d8b16c5af52')
validpgpkeys=('857A2A1560004F80CB76929FACC9784053EA63DC') # François Voron <fvoron@gmail.com>

build() {
	cd "${_pkgname}"
	python -m build --wheel --no-isolation
}

package() {
	cd "${_pkgname}"
	python -m installer --destdir="${pkgdir}" dist/*.whl
	install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
