Automatic versioning for spheira theme

This commit is contained in:
2026-02-11 18:06:11 +01:00
parent 56aab21389
commit e3b8698438
2 changed files with 13 additions and 9 deletions

View File

@@ -17,18 +17,22 @@ clear_output_directory() {
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() {
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"
local base="$build_dir/$variant_dir"
local manifest_path="$base/config/omninx/manifest.ini"
local theme_path="$base/config/sphaira/themes/omninx.ini"
for path in "$manifest_path" "$theme_path"; do
if [[ -f "$path" ]]; then
if [[ "$(uname)" == "Darwin" ]]; then
sed -i '' "s/^version=.*/version=$VERSION/" "$path"
else
sed -i "s/^version=.*/version=$VERSION/" "$path"
fi
fi
fi
done
}
# Light: Staging (Root) + Ordner "OmniNX Light" = variants/light

View File

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