From 1cf402eae9d4b98f839ce9d116f807531cda7862 Mon Sep 17 00:00:00 2001 From: Levente Polyak Date: Fri, 9 Feb 2024 20:18:30 +0100 Subject: fix(build): forward target repo options to the release subcommand The adequate target repo options are not appropriately forwarded to the release subcommand if the auto-release options is activated. Previously we did not restrict the --repo option, which the build option has used as a shortcut. Since last release, this option is restricted to new packages that are not in any official repository yet. Fix this issue by forwarding the same target repo options that have been used during the build command and not forcefully the --repo options. Fixes #209 Component: pkgctl build Signed-off-by: Levente Polyak --- src/lib/build/build.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/lib/build') diff --git a/src/lib/build/build.sh b/src/lib/build/build.sh index 9bd1e5d..171bb9a 100644 --- a/src/lib/build/build.sh +++ b/src/lib/build/build.sh @@ -154,6 +154,7 @@ pkgctl_build() { (( $# <= 1 )) && die "missing argument for %s" "$1" pkgctl_build_check_option_group_repo '--repo' "${REPO}" "${TESTING}" "${STAGING}" REPO="${2}" + RELEASE_OPTIONS+=("--repo" "${REPO}") shift 2 ;; --arch) @@ -204,11 +205,13 @@ pkgctl_build() { -s|--staging) pkgctl_build_check_option_group_repo '--staging' "${REPO}" "${TESTING}" "${STAGING}" STAGING=1 + RELEASE_OPTIONS+=("--staging") shift ;; -t|--testing) pkgctl_build_check_option_group_repo '--testing' "${REPO}" "${TESTING}" "${STAGING}" TESTING=1 + RELEASE_OPTIONS+=("--testing") shift ;; -c|--clean) @@ -495,7 +498,7 @@ pkgctl_build() { # release the build if (( RELEASE )); then - pkgctl_release --repo "${pkgrepo}" "${RELEASE_OPTIONS[@]}" + pkgctl_release "${RELEASE_OPTIONS[@]}" fi # reset common PKGBUILD variables -- cgit v1.2.3-70-g09d2