chore: version 0.9.4 release

This commit is contained in:
2026-03-25 12:22:50 +01:00
parent 6e4f19a965
commit fcf938ee6f
6 changed files with 19 additions and 63 deletions

View File

@@ -4,7 +4,7 @@ set -euo pipefail
readonly SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
readonly REGISTRY_IMAGE="registry.assecutor.org/muh"
readonly APP_CONFIG_FILE="${SCRIPT_DIR}/backend/src/main/resources/application.yml"
readonly POM_FILE="${SCRIPT_DIR}/backend/pom.xml"
usage() {
cat <<'EOF'
@@ -20,7 +20,7 @@ Voraussetzungen:
- Login zur Registry wurde bereits ausgeführt:
docker login registry.assecutor.org
Ohne Versionsargument wird automatisch die Version aus backend/src/main/resources/application.yml verwendet.
Ohne Versionsargument wird automatisch die Version aus backend/pom.xml verwendet.
Optional kann VITE_API_URL als Umgebungsvariable gesetzt werden.
EOF
}
@@ -35,39 +35,13 @@ require_command() {
}
resolve_app_version() {
[[ -f "${APP_CONFIG_FILE}" ]] || fail "'${APP_CONFIG_FILE}' wurde nicht gefunden."
[[ -f "${POM_FILE}" ]] || fail "'${POM_FILE}' wurde nicht gefunden."
local version
version="$(
awk '
$0 ~ /^muh:[[:space:]]*$/ {
in_muh = 1
in_app = 0
next
}
version="$(sed -n '/<parent>/,/<\/parent>/!{ s/.*<version>\(.*\)<\/version>.*/\1/p; }' "${POM_FILE}" | head -1)"
in_muh && $0 ~ /^[^[:space:]]/ {
in_muh = 0
in_app = 0
}
in_muh && $0 ~ /^[[:space:]][[:space:]]app:[[:space:]]*$/ {
in_app = 1
next
}
in_app && $0 ~ /^[[:space:]][[:space:]][^[:space:]]/ {
in_app = 0
}
in_muh && in_app && match($0, /^[[:space:]][[:space:]][[:space:]][[:space:]]version:[[:space:]]*"?([0-9]+\.[0-9]+\.[0-9]+)"?[[:space:]]*$/, a) {
print a[1]
exit
}
' "${APP_CONFIG_FILE}"
)"
[[ -n "${version}" ]] || fail "Version konnte nicht aus ${APP_CONFIG_FILE} ermittelt werden."
[[ -n "${version}" ]] || fail "Version konnte nicht aus ${POM_FILE} ermittelt werden."
[[ "${version}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || fail "Version in ${POM_FILE} muss das Format x.y.z haben."
echo "${version}"
}