Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src/lib/version.sh
diff options
context:
space:
mode:
authorChristian Heusel <christian@heusel.eu>2024-01-05 19:10:38 +0100
committerChristian Heusel <christian@heusel.eu>2024-01-21 23:28:29 +0100
commit6054c869e1b9b853aa7408261e477dcb187ff498 (patch)
treeefe2d7142005274baef7f767239f5e04097eeba6 /src/lib/version.sh
parent313c5b4d32291e618cc136035f5e056581aec416 (diff)
feat(upgrade): introduce the version upgrade subcommand
This subcommand applies the detected upstream version upgrades to a PKGBUILD. Component: pkgctl version upgrade Co-authored-by: Levente Polyak <anthraxx@archlinux.org> Signed-off-by: Christian Heusel <christian@heusel.eu>
Diffstat (limited to 'src/lib/version.sh')
-rw-r--r--src/lib/version.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/version.sh b/src/lib/version.sh
index 826b306..14cd810 100644
--- a/src/lib/version.sh
+++ b/src/lib/version.sh
@@ -18,7 +18,8 @@ pkgctl_version_usage() {
Package version related commands.
COMMANDS
- check Check if there is a newer version availble
+ check Check if there is a newer version availble
+ upgrade Upgrade the PKGBUILD according to the latest available upstream version
OPTIONS
-h, --help Show this help text
@@ -48,6 +49,14 @@ pkgctl_version() {
pkgctl_version_check "$@"
exit 0
;;
+ upgrade)
+ _DEVTOOLS_COMMAND+=" $1"
+ shift
+ # shellcheck source=src/lib/version/upgrade.sh
+ source "${_DEVTOOLS_LIBRARY_DIR}"/lib/version/upgrade.sh
+ pkgctl_version_upgrade "$@"
+ exit 0
+ ;;
*)
die "invalid argument: %s" "$1"
;;