Release Healer Man 0.1.3

This commit is contained in:
phenom
2026-08-17 17:12:02 -04:00
parent 7e60864e70
commit 5bb170039a
12 changed files with 1569 additions and 23 deletions
+21
View File
@@ -28,13 +28,34 @@ foreach ($secret in $requiredSecrets) {
}
$projectRoot = Split-Path -Parent $PSScriptRoot
$packageVersion = (Get-Content -LiteralPath (Join-Path $projectRoot 'package.json') -Raw | ConvertFrom-Json).version
$releaseVersionPath = Join-Path $projectRoot 'release-version.json'
if (-not (Test-Path -LiteralPath $releaseVersionPath)) {
throw "Canonical release metadata is missing: $releaseVersionPath"
}
$releaseVersion = Get-Content -LiteralPath $releaseVersionPath -Raw | ConvertFrom-Json
if ($packageVersion -ne $VersionName -or $releaseVersion.versionName -ne $VersionName) {
throw "VersionName $VersionName does not match package.json and release-version.json."
}
if ([int]$releaseVersion.versionCode -ne $VersionCode) {
throw "VersionCode $VersionCode does not match release-version.json ($($releaseVersion.versionCode))."
}
$env:ANDROID_VERSION_NAME = $VersionName
$env:ANDROID_VERSION_CODE = [string]$VersionCode
Push-Location $projectRoot
try {
$initialGitStatus = & git status --porcelain
if ($LASTEXITCODE -ne 0) { throw "Unable to inspect the Git working tree." }
if ($initialGitStatus) { throw "APK publication requires a clean Git working tree." }
& npm run android:sync
if ($LASTEXITCODE -ne 0) { throw "Android web build and Capacitor sync failed with exit code $LASTEXITCODE" }
$postSyncGitStatus = & git status --porcelain --untracked-files=no
if ($LASTEXITCODE -ne 0) { throw "Unable to inspect Android sync changes." }
if ($postSyncGitStatus) {
throw "Android sync changed tracked files. Review and commit them before publishing the APK."
}
& powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/runAndroidGradle.ps1 assembleRelease
if ($LASTEXITCODE -ne 0) { throw "Android release build failed with exit code $LASTEXITCODE" }