Automatic versioning for spheira theme

This commit is contained in:
niklascfw 2026-02-11 18:06:11 +01:00
parent 56aab21389
commit e3b8698438
No known key found for this signature in database
2 changed files with 13 additions and 9 deletions

View file

@ -17,18 +17,22 @@ clear_output_directory() {
echo "Output-Verzeichnis gelöscht." echo "Output-Verzeichnis gelöscht."
} }
# Update manifest.ini version in build directory # Update manifest.ini and Sphaira theme version in build directory
update_manifest_version() { update_manifest_version() {
local build_dir="$1" local build_dir="$1"
local variant_dir="$2" local variant_dir="$2"
local manifest_path="$build_dir/$variant_dir/config/omninx/manifest.ini" local base="$build_dir/$variant_dir"
if [[ -f "$manifest_path" ]]; then local manifest_path="$base/config/omninx/manifest.ini"
if [[ "$(uname)" == "Darwin" ]]; then local theme_path="$base/config/sphaira/themes/omninx.ini"
sed -i '' "s/^version=.*/version=$VERSION/" "$manifest_path" for path in "$manifest_path" "$theme_path"; do
else if [[ -f "$path" ]]; then
sed -i "s/^version=.*/version=$VERSION/" "$manifest_path" if [[ "$(uname)" == "Darwin" ]]; then
sed -i '' "s/^version=.*/version=$VERSION/" "$path"
else
sed -i "s/^version=.*/version=$VERSION/" "$path"
fi
fi fi
fi done
} }
# Light: Staging (Root) + Ordner "OmniNX Light" = variants/light # Light: Staging (Root) + Ordner "OmniNX Light" = variants/light

View file

@ -1,7 +1,7 @@
[meta] [meta]
name=OmniNX name=OmniNX
author=NiklasCFW author=NiklasCFW
version=1.0.0 version={{VERSION}}
preview=romfs:/theme/preview.jpg preview=romfs:/theme/preview.jpg
[theme] [theme]