diff --git a/scripts/build-all.sh b/scripts/build-all.sh index 701add3..0891906 100755 --- a/scripts/build-all.sh +++ b/scripts/build-all.sh @@ -16,6 +16,20 @@ clear_output_directory() { echo "Output-Verzeichnis gelöscht." } +# Update manifest.ini version in build directory +update_manifest_version() { + local build_dir="$1" + local variant_dir="$2" + local manifest_path="$build_dir/$variant_dir/config/omninx/manifest.ini" + if [[ -f "$manifest_path" ]]; then + if [[ "$(uname)" == "Darwin" ]]; then + sed -i '' "s/^version=.*/version=$VERSION/" "$manifest_path" + else + sed -i "s/^version=.*/version=$VERSION/" "$manifest_path" + fi + fi +} + # Light: Staging (Root) + Ordner "OmniNX Light" = varients/light build_light() { local build_dir @@ -24,6 +38,7 @@ build_light() { cp -R "$STAGING_DIR/." "$build_dir/" mkdir -p "$build_dir/OmniNX Light" cp -R "$VARIANTS_DIR/light/." "$build_dir/OmniNX Light/" + update_manifest_version "$build_dir" "OmniNX Light" mkdir -p "$OUTPUT_DIR" cd "$build_dir" && zip -q -r "$OUTPUT_DIR/OmniNX-Light-$VERSION.zip" . && cd "$PROJECT_ROOT" rm -rf "$build_dir" @@ -38,6 +53,7 @@ build_standard() { mkdir -p "$build_dir/OmniNX Standard" cp -R "$VARIANTS_DIR/light/." "$build_dir/OmniNX Standard/" cp -R "$VARIANTS_DIR/standard/." "$build_dir/OmniNX Standard/" + update_manifest_version "$build_dir" "OmniNX Standard" mkdir -p "$OUTPUT_DIR" cd "$build_dir" && zip -q -r "$OUTPUT_DIR/OmniNX-Standard-$VERSION.zip" . && cd "$PROJECT_ROOT" rm -rf "$build_dir" @@ -53,6 +69,7 @@ build_oc() { cp -R "$VARIANTS_DIR/light/." "$build_dir/OmniNX OC/" cp -R "$VARIANTS_DIR/standard/." "$build_dir/OmniNX OC/" cp -R "$VARIANTS_DIR/oc/." "$build_dir/OmniNX OC/" + update_manifest_version "$build_dir" "OmniNX OC" mkdir -p "$OUTPUT_DIR" cd "$build_dir" && zip -q -r "$OUTPUT_DIR/OmniNX-OC-$VERSION.zip" . && cd "$PROJECT_ROOT" rm -rf "$build_dir" diff --git a/varients/light/config/omninx/manifest.ini b/varients/light/config/omninx/manifest.ini index 9836003..670fd57 100644 --- a/varients/light/config/omninx/manifest.ini +++ b/varients/light/config/omninx/manifest.ini @@ -1,5 +1,5 @@ [OmniNX] current_pack=Light -version=1.0.0 +version={{VERSION}} update_channel=0 channel_pack=Light diff --git a/varients/oc/config/omninx/manifest.ini b/varients/oc/config/omninx/manifest.ini index 9301dbf..7dca6ee 100644 --- a/varients/oc/config/omninx/manifest.ini +++ b/varients/oc/config/omninx/manifest.ini @@ -1,5 +1,5 @@ [OmniNX] current_pack=OC -version=1.0.0 +version={{VERSION}} update_channel=1 channel_pack=OC diff --git a/varients/standard/config/omninx/manifest.ini b/varients/standard/config/omninx/manifest.ini index 96ba6f9..36f5c72 100644 --- a/varients/standard/config/omninx/manifest.ini +++ b/varients/standard/config/omninx/manifest.ini @@ -1,5 +1,5 @@ [OmniNX] current_pack=Standard -version=1.0.0 +version={{VERSION}} update_channel=2 channel_pack=Standard \ No newline at end of file