chore(build): use more intuitive update-checksums option for humans

The philosophy of our CLI is to provide options that better match human
expectations in an intuitive way rather than mimic wording of previous
tools with abbreviation.

Component: pkgctl build
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
This commit is contained in:
Levente Polyak 2023-12-21 21:40:57 +01:00
parent 2a1e8aebaf
commit 4425913e4f
No known key found for this signature in database
GPG Key ID: FC1B547C8D8172C8
4 changed files with 14 additions and 10 deletions

View File

@ -179,7 +179,7 @@ _pkgctl_build_args=(
--pkgver --pkgver
--pkgrel --pkgrel
--rebuild --rebuild
--updpkgsums --update-checksums
-e --edit -e --edit
-r --release -r --release

View File

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

View File

@ -63,8 +63,12 @@ PKGBUILD Options
*--rebuild*:: *--rebuild*::
Increment the current pkgrel variable Increment the current pkgrel variable
*--updpkgsums*:: *--update-checksums*::
Regenerate the checksums Force computation and update of the checksums by disabling auto-detection. +
Should only be used in special circumstances, like when adding new patch
files to the source array. During regular packaging operations, checksums
are either automatically updated when upgrading a package using `--pkgver`
or should remain immutable during rebuilds.
*-e, --edit*:: *-e, --edit*::
Edit the PKGBUILD before building Edit the PKGBUILD before building

View File

@ -58,7 +58,7 @@ pkgctl_build_usage() {
--pkgver=PKGVER Set pkgver, reset pkgrel and update checksums --pkgver=PKGVER Set pkgver, reset pkgrel and update checksums
--pkgrel=PKGREL Set pkgrel to a given value --pkgrel=PKGREL Set pkgrel to a given value
--rebuild Increment the current pkgrel variable --rebuild Increment the current pkgrel variable
--updpkgsums Regenerate the checksums --update-checksums Force computation and update of the checksums (disables auto-detection)
-e, --edit Edit the PKGBUILD before building -e, --edit Edit the PKGBUILD before building
RELEASE OPTIONS RELEASE OPTIONS
@ -108,7 +108,7 @@ pkgctl_build() {
exit 1 exit 1
fi fi
local UPDPKGSUMS=0 local UPDATE_CHECKSUMS=0
local EDIT=0 local EDIT=0
local REBUILD=0 local REBUILD=0
local OFFLOAD=0 local OFFLOAD=0
@ -165,7 +165,7 @@ pkgctl_build() {
pkgctl_build_check_option_group_ver '--pkgver' "${PKGVER}" "${PKGREL}" "${REBUILD}" pkgctl_build_check_option_group_ver '--pkgver' "${PKGVER}" "${PKGREL}" "${REBUILD}"
PKGVER="${1#*=}" PKGVER="${1#*=}"
PKGREL=1 PKGREL=1
UPDPKGSUMS=1 UPDATE_CHECKSUMS=1
shift shift
;; ;;
--pkgrel=*) --pkgrel=*)
@ -173,8 +173,8 @@ pkgctl_build() {
PKGREL="${1#*=}" PKGREL="${1#*=}"
shift shift
;; ;;
--updpkgsums) --update-checksums)
UPDPKGSUMS=1 UPDATE_CHECKSUMS=1
shift shift
;; ;;
--rebuild) --rebuild)
@ -407,7 +407,7 @@ pkgctl_build() {
# update checksums if any sources are declared # update checksums if any sources are declared
if (( UPDPKGSUMS )) && (( ${#source[@]} >= 1 )); then if (( UPDATE_CHECKSUMS )) && (( ${#source[@]} >= 1 )); then
updpkgsums updpkgsums
fi fi