Improve Android OpenPGP, drafts and release builds
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
+16
-13
@@ -1,19 +1,22 @@
|
||||
# Builds the Android APK and the Windows portable exe into .\release
|
||||
param(
|
||||
[string]$WslDistribution
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Set-Location $PSScriptRoot\..
|
||||
$version = (Get-Content package.json -Raw | ConvertFrom-Json).version
|
||||
if (-not $env:JAVA_HOME) { $env:JAVA_HOME = 'C:\Program Files\Android\Android Studio\jbr' }
|
||||
if (-not $env:ANDROID_HOME) { $env:ANDROID_HOME = Join-Path $env:LOCALAPPDATA 'Android\Sdk' }
|
||||
New-Item -ItemType Directory -Force release | Out-Null
|
||||
|
||||
Write-Host "== Building APK $version =="
|
||||
npm run android:apk
|
||||
if ($LASTEXITCODE) { throw 'APK build failed' }
|
||||
Copy-Item android\app\build\outputs\apk\debug\app-debug.apk "release\ep-mail $version.apk" -Force
|
||||
& "$PSScriptRoot\build.ps1"
|
||||
|
||||
Write-Host "== Building portable exe $version =="
|
||||
npm run dist:win:portable
|
||||
if ($LASTEXITCODE) { throw 'Portable build failed' }
|
||||
Write-Host "`n== Building Windows installer $version =="
|
||||
npm run dist:win:installer
|
||||
if ($LASTEXITCODE) { throw 'Windows installer build failed' }
|
||||
|
||||
Write-Host "`nDone:"
|
||||
Get-ChildItem release | Where-Object { $_.Name -like "ep-mail $version.*" } | ForEach-Object { " $($_.FullName)" }
|
||||
Write-Host "`n== Building Linux AppImage and deb $version in WSL =="
|
||||
$wslArguments = @()
|
||||
if ($WslDistribution) { $wslArguments += @('--distribution', $WslDistribution) }
|
||||
$wslArguments += @('--exec', 'bash', './scripts/build-linux-wsl.sh')
|
||||
& wsl.exe @wslArguments
|
||||
if ($LASTEXITCODE) { throw 'WSL Linux build failed' }
|
||||
|
||||
Write-Host "`nAll platform builds completed for $version. Artifacts are in release\."
|
||||
|
||||
Reference in New Issue
Block a user