feat: Implement brand-aware release creation for Agravity
Some checks failed
Tests & Quality Checks / Test on Python 3.11 (push) Has been cancelled
Tests & Quality Checks / Test on Python 3.12 (push) Has been cancelled
Tests & Quality Checks / Test on Python 3.11-1 (push) Has been cancelled
Tests & Quality Checks / Test on Python 3.12-1 (push) Has been cancelled
Tests & Quality Checks / Test on Python 3.10 (push) Has been cancelled
Tests & Quality Checks / Test on Python 3.11-2 (push) Has been cancelled
Tests & Quality Checks / Test on Python 3.12-2 (push) Has been cancelled
Tests & Quality Checks / Build Artifacts (push) Has been cancelled
Tests & Quality Checks / Build Artifacts-1 (push) Has been cancelled

- Added support for multiple brands in release scripts, allowing for branded artifacts.
- Introduced brand configuration management with JSON files for each brand.
- Created a new `brand_config.py` script to handle brand-specific logic and asset resolution.
- Updated `create_release.ps1` and `create_release.sh` scripts to utilize brand configurations and generate release manifests.
- Added unit tests for brand configuration loading and release manifest generation.
- Introduced `agravity` brand with its specific configuration in `agravity.json`.
This commit is contained in:
claudi 2026-03-10 16:18:28 +01:00
parent b988532aaa
commit fd69996c53
8 changed files with 552 additions and 409 deletions

View file

@ -28,10 +28,13 @@ DIST_DIR="$BUILD_DIR/dist/macos"
TEMP_BUILD="$BUILD_DIR/temp/macos"
SPECS_DIR="$BUILD_DIR/specs"
SPEC_FILE="$BUILD_DIR/webdrop_bridge.spec"
BRAND_HELPER="$BUILD_DIR/scripts/brand_config.py"
BRAND=""
APP_NAME="WebDropBridge"
DMG_VOLUME_NAME="WebDrop Bridge"
VERSION="1.0.0"
BUNDLE_IDENTIFIER="de.him_tools.webdrop-bridge"
VERSION=""
# Default .env file
ENV_FILE="$PROJECT_ROOT/.env"
@ -54,6 +57,10 @@ while [[ $# -gt 0 ]]; do
ENV_FILE="$2"
shift 2
;;
--brand)
BRAND="$2"
shift 2
;;
*)
echo "Unknown option: $1"
exit 1
@ -70,6 +77,18 @@ fi
echo "📋 Using configuration: $ENV_FILE"
if [ -n "$BRAND" ]; then
eval "$(python3 "$BRAND_HELPER" env --brand "$BRAND")"
APP_NAME="$WEBDROP_ASSET_PREFIX"
DMG_VOLUME_NAME="$WEBDROP_APP_DISPLAY_NAME"
BUNDLE_IDENTIFIER="$WEBDROP_BUNDLE_ID"
DIST_DIR="$BUILD_DIR/dist/macos/$WEBDROP_BRAND_ID"
TEMP_BUILD="$BUILD_DIR/temp/macos/$WEBDROP_BRAND_ID"
echo "🏷️ Building brand: $WEBDROP_APP_DISPLAY_NAME ($WEBDROP_BRAND_ID)"
fi
VERSION="$(python3 -c "from pathlib import Path; import sys; sys.path.insert(0, str(Path(r'$BUILD_DIR/scripts').resolve())); from version_utils import get_current_version; print(get_current_version())")"
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
@ -178,6 +197,8 @@ build_executable() {
# Export env file for spec file to pick up
export WEBDROP_ENV_FILE="$ENV_FILE"
export WEBDROP_VERSION="$VERSION"
export WEBDROP_BUNDLE_ID="$BUNDLE_IDENTIFIER"
python3 -m PyInstaller \
--distpath="$DIST_DIR" \
@ -252,6 +273,8 @@ create_dmg() {
SIZE=$(du -h "$DMG_FILE" | cut -f1)
log_success "DMG created successfully"
log_info "Output: $DMG_FILE (Size: $SIZE)"
shasum -a 256 "$DMG_FILE" | awk '{print $1}' > "$DMG_FILE.sha256"
log_info "Checksum: $DMG_FILE.sha256"
echo ""
}