1.0.0-1 Script

This commit is contained in:
2026-07-02 08:38:15 +02:00
parent ad5c3f328c
commit abe5a03b05
-40
View File
@@ -1,5 +1,4 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: GPL-2.0-or-later
set -euo pipefail
@@ -85,29 +84,6 @@ bump_version() {
printf '%s.%s.%s' "$major" "$minor" "$patch"
}
increment_build_version() {
local version="$1"
parse_version "$version"
local build_number=1
if [[ "$PARSED_SUFFIX" =~ ^[0-9]+$ ]]; then
build_number=$((PARSED_SUFFIX + 1))
elif [[ -n "$PARSED_SUFFIX" ]]; then
echo "Build-Bump nicht moeglich fuer Suffix '$PARSED_SUFFIX'."
echo "Unterstuetzt: keine Suffixe oder eine numerische Buildnummer."
exit 1
fi
printf '%s.%s.%s-%s' "$PARSED_MAJOR" "$PARSED_MINOR" "$PARSED_PATCH" "$build_number"
}
can_increment_build_version() {
local version="$1"
parse_version "$version"
[[ -z "$PARSED_SUFFIX" || "$PARSED_SUFFIX" =~ ^[0-9]+$ ]]
}
increment_rc_version() {
local version="$1"
parse_version "$version"
@@ -343,10 +319,6 @@ fi
next_patch="$(bump_version "$root_version" patch)"
next_minor="$(bump_version "$root_version" minor)"
next_major="$(bump_version "$root_version" major)"
next_build=""
if can_increment_build_version "$root_version"; then
next_build="$(increment_build_version "$root_version")"
fi
next_rc=""
if can_increment_rc_version "$root_version"; then
next_rc="$(increment_rc_version "$root_version")"
@@ -373,9 +345,6 @@ else
echo " 1) Patch -> $next_patch"
echo " 2) Minor -> $next_minor"
echo " 3) Major -> $next_major"
if [[ -n "$next_build" ]]; then
echo " 4) Build -> $next_build"
fi
read -r -p "Auswahl [1]: " version_choice
version_choice="${version_choice:-1}"
@@ -398,15 +367,6 @@ else
release_mode="Major ($SELECTED_RELEASE_LABEL)"
apply_version_change=true
;;
4)
if [[ -z "$next_build" ]]; then
echo "Build-Bump ist fuer die aktuelle Version nicht verfuegbar."
exit 1
fi
target_version="$next_build"
release_mode="Build"
apply_version_change=true
;;
*)
echo "Ungueltige Versions-Auswahl."
exit 1