feat: Update application version to 0.5.0 and refactor version syncing script

This commit is contained in:
claudi 2026-02-18 13:48:32 +01:00
parent dffc925bb6
commit ff804790e6
4 changed files with 23 additions and 22 deletions

View file

@ -2,7 +2,7 @@
# Application
APP_NAME=WebDrop Bridge
APP_VERSION=0.1.0
APP_VERSION=0.5.0
# Web App
WEBAPP_URL=file:///./webapp/index.html

View file

@ -28,14 +28,13 @@ from pathlib import Path
from datetime import datetime
# Import shared version utilities
from version_utils import get_current_version
from sync_version import get_current_version, sync_version
# Fix Unicode output on Windows
# Fix Unicode output on Windows (removed TextIOWrapper due to subprocess conflicts)
# TextIOWrapper causes issues when subprocess tries to write to file descriptors
if sys.platform == "win32":
import io
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding="utf-8")
import os
os.environ["PYTHONIOENCODING"] = "utf-8"
class WindowsBuilder:
@ -116,8 +115,7 @@ class WindowsBuilder:
result = subprocess.run(
cmd,
cwd=str(self.project_root),
encoding="utf-8",
errors="replace",
text=True,
env=env
)
@ -205,8 +203,7 @@ class WindowsBuilder:
print(f" Compiling WiX source...")
result = subprocess.run(
candle_cmd,
encoding="utf-8",
errors="replace"
text=True
)
if result.returncode != 0:
print("❌ WiX compilation failed")
@ -223,8 +220,7 @@ class WindowsBuilder:
print(f" Linking MSI installer...")
result = subprocess.run(
light_cmd,
encoding="utf-8",
errors="replace"
text=True
)
if result.returncode != 0:
print("❌ MSI linking failed")
@ -330,8 +326,7 @@ class WindowsBuilder:
result = subprocess.run(
cmd,
encoding="utf-8",
errors="replace"
text=True
)
if result.returncode != 0:
print("❌ Code signing failed")

View file

@ -25,10 +25,17 @@ param(
$ErrorActionPreference = "Stop"
# Get project root (PSScriptRoot is build/scripts, go up to project root with ..\..)
$projectRoot = Resolve-Path (Join-Path $PSScriptRoot "..\..")
# Resolve file paths relative to project root
$ExePath = Join-Path $projectRoot $ExePath
$ChecksumPath = Join-Path $projectRoot $ChecksumPath
$MsiPath = Join-Path $projectRoot $MsiPath
# Function to read version from .env or .env.example
function Get-VersionFromEnv {
# PSScriptRoot is build/scripts, go up to project root with ../../
$projectRoot = Resolve-Path (Join-Path $PSScriptRoot "..\..")
# Use already resolved project root
# Try .env first (runtime config), then .env.example (template)
$envFile = Join-Path $projectRoot ".env"

View file

@ -23,9 +23,8 @@ from pathlib import Path
# Enable UTF-8 output on Windows
if sys.platform == "win32":
import io
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding="utf-8")
import os
os.environ["PYTHONIOENCODING"] = "utf-8"
# Import shared version utilities
sys.path.insert(0, str(Path(__file__).parent.parent / "build" / "scripts"))
@ -131,7 +130,7 @@ def update_changelog(version: str) -> None:
print(f"✓ Added version header to CHANGELOG.md for {version}")
def main() -> int:
def sync_version() -> int:
"""Sync version across project.
Updates __init__.py (source of truth) and changelog.
@ -176,4 +175,4 @@ def main() -> int:
if __name__ == "__main__":
sys.exit(main())
sys.exit(sync_version())