feat(build): add --updpkgsums option

This is useful so people who update patches etc. can update their checksums on building.
The functionality itself was already implemented for --pkgver, but was not available separately.

Fixes #168
Component: pkgctl build
Signed-off-by: Christian Heusel <christian@heusel.eu>
This commit is contained in:
Christian Heusel 2023-07-25 11:19:11 +02:00
parent 4d7364ed1b
commit e7b82f36ef
No known key found for this signature in database
GPG Key ID: C047D4F328B52585
4 changed files with 10 additions and 0 deletions

View File

@ -173,6 +173,7 @@ _pkgctl_build_args=(
--pkgver
--pkgrel
--rebuild
--updpkgsums
-e --edit
-r --release

View File

@ -47,6 +47,7 @@ _pkgctl_build_args=(
'--pkgver=[Set pkgver, reset pkgrel and update checksums]:pkgver:'
'--pkgrel=[Set pkgrel to a given value]:pkgrel:'
'--rebuild[Increment the pkgrel variable]'
'--updpkgsums[Regenerate the checksums]'
'(-e --edit)'{-e,--edit}'[Edit the PKGBUILD before building]'
'(-r --release)'{-r,--release}'[Automatically commit, tag and release after building]'
'(-m --message=)'{-m,--message=}"[Use the given <msg> as the commit message]:message:"

View File

@ -59,6 +59,9 @@ PKGBUILD Options
*--rebuild*::
Increment the current pkgrel variable
*--updpkgsums*::
Regenerate the checksums
*-e, --edit*::
Edit the PKGBUILD before building

View File

@ -55,6 +55,7 @@ pkgctl_build_usage() {
--pkgver=PKGVER Set pkgver, reset pkgrel and update checksums
--pkgrel=PKGREL Set pkgrel to a given value
--rebuild Increment the current pkgrel variable
--updpkgsums Regenerate the checksums
-e, --edit Edit the PKGBUILD before building
RELEASE OPTIONS
@ -169,6 +170,10 @@ pkgctl_build() {
PKGREL="${1#*=}"
shift
;;
--updpkgsums)
UPDPKGSUMS=1
shift
;;
--rebuild)
# shellcheck source=src/lib/util/git.sh
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/util/git.sh