2021-07-24 10:00:43 +00:00
|
|
|
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
2021-09-27 23:54:24 +00:00
|
|
|
# Contributor: Jayson Reis <santosdosreis@gmail.com>
|
2021-07-24 10:00:43 +00:00
|
|
|
|
2022-01-17 21:19:34 +00:00
|
|
|
_pkgname=commitizen
|
|
|
|
pkgname=python-commitizen
|
2022-02-24 07:22:24 +00:00
|
|
|
pkgver=2.21.2
|
2022-02-07 22:52:32 +00:00
|
|
|
pkgrel=1
|
2021-07-24 10:00:43 +00:00
|
|
|
pkgdesc="A tool for enforcing descriptive commit messages and version/changelog management"
|
|
|
|
arch=('any')
|
|
|
|
url="https://github.com/commitizen-tools/commitizen"
|
|
|
|
license=('MIT')
|
|
|
|
depends=(
|
|
|
|
'python'
|
2021-08-14 02:09:50 +00:00
|
|
|
'python-questionary'
|
|
|
|
'python-decli'
|
2021-07-24 10:00:43 +00:00
|
|
|
'python-colorama'
|
|
|
|
'python-termcolor'
|
|
|
|
'python-packaging'
|
|
|
|
'python-tomlkit'
|
|
|
|
'python-jinja'
|
|
|
|
'python-pyaml'
|
|
|
|
'python-argcomplete'
|
|
|
|
'python-prompt_toolkit'
|
|
|
|
)
|
2021-09-27 23:54:24 +00:00
|
|
|
makedepends=(
|
2022-02-07 22:52:32 +00:00
|
|
|
'git'
|
2021-12-14 02:10:32 +00:00
|
|
|
'python-install'
|
2021-09-27 23:54:24 +00:00
|
|
|
'python-build'
|
2022-01-17 21:19:34 +00:00
|
|
|
'python-poetry-core'
|
2021-09-27 23:54:24 +00:00
|
|
|
)
|
2022-01-17 21:19:34 +00:00
|
|
|
provides=('cz' 'git-cz')
|
|
|
|
conflicts=('nodejs-commitizen' 'commitizen-go')
|
2022-02-24 07:22:24 +00:00
|
|
|
_commit='6efad39c93ca236faf67a8e2c81f676326b8a169'
|
2022-02-07 22:52:32 +00:00
|
|
|
source=("$pkgname::git+$url.git#commit=$_commit")
|
|
|
|
b2sums=('SKIP')
|
2021-07-24 10:00:43 +00:00
|
|
|
|
2022-02-07 22:52:32 +00:00
|
|
|
pkgver() {
|
|
|
|
cd "$pkgname"
|
|
|
|
|
|
|
|
git describe --tags | sed 's/^v//'
|
|
|
|
}
|
|
|
|
|
|
|
|
prepare() {
|
|
|
|
cd "$pkgname"
|
2021-07-24 10:00:43 +00:00
|
|
|
|
2021-09-27 23:54:24 +00:00
|
|
|
# create completions
|
|
|
|
mkdir completions
|
|
|
|
register-python-argcomplete --shell bash cz > completions/bash
|
|
|
|
register-python-argcomplete --shell fish cz > completions/fish
|
|
|
|
}
|
2021-07-24 10:00:43 +00:00
|
|
|
|
|
|
|
build() {
|
2022-02-07 22:52:32 +00:00
|
|
|
cd "$pkgname"
|
2021-09-27 23:54:24 +00:00
|
|
|
|
2022-01-17 21:19:34 +00:00
|
|
|
python -m build \
|
|
|
|
--wheel \
|
|
|
|
--skip-dependency-check \
|
|
|
|
--no-isolation
|
2021-07-24 10:00:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2022-02-07 22:52:32 +00:00
|
|
|
cd "$pkgname"
|
2021-07-24 10:00:43 +00:00
|
|
|
|
2021-12-14 02:10:32 +00:00
|
|
|
python -m install \
|
|
|
|
--optimize=1 \
|
|
|
|
--destdir="$pkgdir" \
|
2021-07-24 10:00:43 +00:00
|
|
|
dist/*.whl
|
2021-08-14 02:09:50 +00:00
|
|
|
|
2022-01-17 21:26:48 +00:00
|
|
|
# fix permissions issue
|
|
|
|
find "$pkgdir/usr/bin" -type f -exec chmod 0755 {} +
|
|
|
|
|
2021-07-24 10:00:43 +00:00
|
|
|
# license
|
|
|
|
install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
|
2021-09-27 23:54:24 +00:00
|
|
|
|
|
|
|
# shell completions
|
|
|
|
install -vDm644 completions/bash "$pkgdir/usr/share/bash-completion/completions/cz"
|
|
|
|
install -vDm644 completions/fish "$pkgdir/usr/share/fish/vendor_completions.d/cz.fish"
|
2021-07-24 10:00:43 +00:00
|
|
|
}
|