From 0669315821ea0af00fcc2c6271eb474174173e0a Mon Sep 17 00:00:00 2001 From: Christian Heusel Date: Fri, 21 Jul 2023 11:04:13 +0200 Subject: chore: refactor variable names in valid-{tags,repos}.sh Even though the variables in these files are globablly used they have a weirdly local sounding name. This commit fixes this by refactoring all usages throughout our codebase. Signed-off-by: Christian Heusel --- src/lib/build/build.sh | 2 +- src/lib/release.sh | 2 +- src/lib/valid-repos.sh | 4 ++-- src/lib/valid-tags.sh | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/lib') diff --git a/src/lib/build/build.sh b/src/lib/build/build.sh index a5a272d..f2549f2 100644 --- a/src/lib/build/build.sh +++ b/src/lib/build/build.sh @@ -274,7 +274,7 @@ pkgctl_build() { if [[ -z ${REPO} ]]; then update_pacman_repo_cache # Check valid repos if not resolved dynamically - elif ! in_array "${REPO}" "${_repos[@]}"; then + elif ! in_array "${REPO}" "${DEVTOOLS_VALID_REPOS[@]}"; then die "Invalid repository target: %s" "${REPO}" fi diff --git a/src/lib/release.sh b/src/lib/release.sh index aabbd35..028d92e 100644 --- a/src/lib/release.sh +++ b/src/lib/release.sh @@ -126,7 +126,7 @@ pkgctl_release() { if [[ -z ${REPO} ]]; then update_pacman_repo_cache # Check valid repos if not resolved dynamically - elif ! in_array "${REPO}" "${_repos[@]}"; then + elif ! in_array "${REPO}" "${DEVTOOLS_VALID_REPOS[@]}"; then die "Invalid repository target: %s" "${REPO}" fi diff --git a/src/lib/valid-repos.sh b/src/lib/valid-repos.sh index 14f90ce..af8a552 100644 --- a/src/lib/valid-repos.sh +++ b/src/lib/valid-repos.sh @@ -4,7 +4,7 @@ : # shellcheck disable=2034 -_repos=( +DEVTOOLS_VALID_REPOS=( core core-staging core-testing extra extra-staging extra-testing multilib multilib-staging multilib-testing @@ -13,7 +13,7 @@ _repos=( ) # shellcheck disable=2034 -_build_repos=( +DEVTOOLS_VALID_BUILDREPOS=( core-staging core-testing extra extra-staging extra-testing multilib multilib-staging multilib-testing diff --git a/src/lib/valid-tags.sh b/src/lib/valid-tags.sh index ca8d7d7..cef0cc6 100644 --- a/src/lib/valid-tags.sh +++ b/src/lib/valid-tags.sh @@ -4,13 +4,13 @@ : # shellcheck disable=2034 -_arch=( +DEVTOOLS_VALID_ARCHES=( x86_64 any ) # shellcheck disable=2034 -_tags=( +DEVTOOLS_VALID_TAGS=( core-x86_64 core-any core-staging-x86_64 core-staging-any core-testing-x86_64 core-testing-any -- cgit v1.2.3-54-g00ecf