From 172e660cd101c75642bb86a40d4f40abb4b4911f Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Tue, 22 Apr 2025 11:58:35 +0200 Subject: [PATCH] [dx] automatically detect version for migrations in installer.sh Signed-off-by: Andrei Kvapil --- scripts/installer.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/installer.sh b/scripts/installer.sh index 47dc965c..2ffeba7b 100755 --- a/scripts/installer.sh +++ b/scripts/installer.sh @@ -3,7 +3,7 @@ set -o pipefail set -e BUNDLE=$(set -x; kubectl get configmap -n cozy-system cozystack -o 'go-template={{index .data "bundle-name"}}') -VERSION=12 +VERSION=$(find scripts/migrations -mindepth 1 -maxdepth 1 -type f | sort -V | awk -F/ 'END {print $NF+1}') run_migrations() { if ! kubectl get configmap -n cozy-system cozystack-version; then