aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantinos Smanis <konstantinos.smanis@gmail.com>2024-07-28 10:18:54 +0300
committerJohn Helmert III <ajak@gentoo.org>2024-09-08 15:46:12 -0700
commita69d311841dc26c1d951e590f8464f8530a134f9 (patch)
tree281f3993675921e6a438c032c1a53f623ea39b90
parentfix: reduce Docker registry pull requests (diff)
downloaddocker-images-a69d311841dc26c1d951e590f8464f8530a134f9.tar.gz
docker-images-a69d311841dc26c1d951e590f8464f8530a134f9.tar.bz2
docker-images-a69d311841dc26c1d951e590f8464f8530a134f9.zip
refactor: simplify `deploy-manifests.sh`
Closes: https://github.com/gentoo/gentoo-docker-images/pull/142 Signed-off-by: John Helmert III <ajak@gentoo.org>
-rwxr-xr-xdeploy-manifests.sh50
1 files changed, 33 insertions, 17 deletions
diff --git a/deploy-manifests.sh b/deploy-manifests.sh
index 08bc158..270f8d2 100755
--- a/deploy-manifests.sh
+++ b/deploy-manifests.sh
@@ -12,23 +12,39 @@ VERSION=${VERSION:-$(date -u +%Y%m%d)}
ORG=${ORG:-gentoo}
-declare -A MANIFEST_TAGS=(
- [stage3:latest]="amd64-openrc;armv5tel-openrc;armv6j_hardfp-openrc;armv7a_hardfp-openrc;arm64-openrc;i686-openrc;ppc64le-openrc;rv64_lp64d-openrc;s390x"
- [stage3:desktop]="amd64-desktop-openrc;arm64-desktop-openrc"
- [stage3:hardened]="amd64-hardened-openrc;i686-hardened-openrc"
- [stage3:hardened-nomultilib]="amd64-hardened-nomultilib-openrc"
- [stage3:musl]="amd64-musl;armv7a_hardfp_musl-openrc;arm64-musl;i686-musl"
- [stage3:musl-hardened]="amd64-musl-hardened;arm64-musl-hardened;ppc64le-musl-hardened-openrc"
- [stage3:nomultilib]="amd64-nomultilib-openrc"
- [stage3:nomultilib-systemd]="amd64-nomultilib-systemd"
- [stage3:systemd]="amd64-systemd;armv5tel-systemd;armv6j_hardfp-systemd;armv7a_hardfp-systemd;arm64-systemd;i686-systemd;ppc64le-systemd;rv64_lp64d-systemd"
-)
-
-IFS=';' read -ra TAGS <<< "${MANIFEST_TAGS[${TARGET}]}"
-if [[ -z "${TAGS+x}" ]]; then
- echo "Done! No manifests to push for TARGET=${TARGET}."
- exit 0
-fi
+case "${TARGET}" in
+ "stage3:latest")
+ TAGS=("amd64-openrc" "armv5tel-openrc" "armv6j_hardfp-openrc" "armv7a_hardfp-openrc" "arm64-openrc" "i686-openrc" "ppc64le-openrc" "rv64_lp64d-openrc" "s390x")
+ ;;
+ "stage3:desktop")
+ TAGS=("amd64-desktop-openrc" "arm64-desktop-openrc")
+ ;;
+ "stage3:hardened")
+ TAGS=("amd64-hardened-openrc" "i686-hardened-openrc")
+ ;;
+ "stage3:hardened-nomultilib")
+ TAGS=("amd64-hardened-nomultilib-openrc")
+ ;;
+ "stage3:musl")
+ TAGS=("amd64-musl" "armv7a_hardfp_musl-openrc" "arm64-musl" "i686-musl")
+ ;;
+ "stage3:musl-hardened")
+ TAGS=("amd64-musl-hardened" "arm64-musl-hardened" "ppc64le-musl-hardened-openrc")
+ ;;
+ "stage3:nomultilib")
+ TAGS=("amd64-nomultilib-openrc")
+ ;;
+ "stage3:nomultilib-systemd")
+ TAGS=("amd64-nomultilib-systemd")
+ ;;
+ "stage3:systemd")
+ TAGS=("amd64-systemd" "armv5tel-systemd" "armv6j_hardfp-systemd" "armv7a_hardfp-systemd" "arm64-systemd" "i686-systemd" "ppc64le-systemd" "rv64_lp64d-systemd")
+ ;;
+ *)
+ echo "Done! No manifests to push for TARGET=${TARGET}."
+ exit 0
+ ;;
+esac
MANIFEST="${TARGET}"
# Latest manifests