Compare commits
2 Commits
f8ceb0bf02
...
4096c67356
| Author | SHA1 | Date |
|---|---|---|
|
|
4096c67356 | |
|
|
cccea8dd7a |
|
|
@ -0,0 +1,73 @@
|
|||
param([switch]$SkipRelease)
|
||||
|
||||
# ============================================================================
|
||||
# Ponshu Room - Consumer APK Build Script (Maita + Eiji)
|
||||
# build.gradle.kts は変更しない。applicationId は既に ponshu_room_lite 固定。
|
||||
# ============================================================================
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
# .env.local を読み込む
|
||||
$envFile = Join-Path $PSScriptRoot ".env.local"
|
||||
if (-not (Test-Path $envFile)) { Write-Error ".env.local not found"; exit 1 }
|
||||
Get-Content $envFile | ForEach-Object {
|
||||
$line = $_.Trim()
|
||||
if ($line -and -not $line.StartsWith('#') -and $line.Contains('=')) {
|
||||
$idx = $line.IndexOf('=')
|
||||
$key = $line.Substring(0, $idx).Trim()
|
||||
$val = $line.Substring($idx + 1).Trim()
|
||||
[System.Environment]::SetEnvironmentVariable($key, $val)
|
||||
}
|
||||
}
|
||||
|
||||
$maitaKey = $env:GEMINI_API_KEY_MAITA
|
||||
$eijiKey = $env:GEMINI_API_KEY_EIJI
|
||||
if (-not $maitaKey) { Write-Error "GEMINI_API_KEY_MAITA not set in .env.local"; exit 1 }
|
||||
if (-not $eijiKey) { Write-Error "GEMINI_API_KEY_EIJI not set in .env.local"; exit 1 }
|
||||
|
||||
# 出力ディレクトリ
|
||||
$timestamp = Get-Date -Format "yyyy-MM-dd_HH-mm-ss"
|
||||
$outputDir = Join-Path $PSScriptRoot "build\apk_releases\$timestamp"
|
||||
New-Item -ItemType Directory -Path $outputDir -Force | Out-Null
|
||||
|
||||
Write-Host "============================================" -ForegroundColor Cyan
|
||||
Write-Host " Ponshu Room - Consumer APK Build" -ForegroundColor Cyan
|
||||
Write-Host "============================================" -ForegroundColor Cyan
|
||||
Write-Host " Output: $outputDir" -ForegroundColor Gray
|
||||
Write-Host ""
|
||||
|
||||
# --- 1. Maita ---
|
||||
Write-Host "[1/2] Building Maita..." -ForegroundColor Yellow
|
||||
flutter build apk --release `
|
||||
--dart-define=GEMINI_API_KEY=$maitaKey `
|
||||
--dart-define=IS_BUSINESS_APP=false
|
||||
|
||||
if ($LASTEXITCODE -ne 0) { Write-Error "Maita build failed"; exit 1 }
|
||||
|
||||
Copy-Item "build\app\outputs\flutter-apk\app-release.apk" `
|
||||
"$outputDir\ponshu_room_consumer_maita.apk" -Force
|
||||
$sz = [math]::Round((Get-Item "$outputDir\ponshu_room_consumer_maita.apk").Length / 1MB, 1)
|
||||
Write-Host " OK: ponshu_room_consumer_maita.apk ($sz MB)" -ForegroundColor Green
|
||||
|
||||
# --- 2. Eiji ---
|
||||
Write-Host "[2/2] Building Eiji..." -ForegroundColor Yellow
|
||||
flutter build apk --release `
|
||||
--dart-define=GEMINI_API_KEY=$eijiKey `
|
||||
--dart-define=IS_BUSINESS_APP=false
|
||||
|
||||
if ($LASTEXITCODE -ne 0) { Write-Error "Eiji build failed"; exit 1 }
|
||||
|
||||
Copy-Item "build\app\outputs\flutter-apk\app-release.apk" `
|
||||
"$outputDir\ponshu_room_consumer_eiji.apk" -Force
|
||||
$sz = [math]::Round((Get-Item "$outputDir\ponshu_room_consumer_eiji.apk").Length / 1MB, 1)
|
||||
Write-Host " OK: ponshu_room_consumer_eiji.apk ($sz MB)" -ForegroundColor Green
|
||||
|
||||
Write-Host ""
|
||||
Write-Host " Build complete: $outputDir" -ForegroundColor Cyan
|
||||
|
||||
# --- 3. Release to Gitea + Vercel ---
|
||||
if (-not $SkipRelease) {
|
||||
Write-Host ""
|
||||
Write-Host " Releasing to Gitea..." -ForegroundColor Cyan
|
||||
& "$PSScriptRoot\release_to_gitea.ps1" -ApkDir $outputDir
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
# In Windows, build-name is used as the major, minor, and patch parts
|
||||
# of the product and file versions while build-number is used as the build suffix.
|
||||
version: 1.0.28+35
|
||||
version: 1.0.29+36
|
||||
|
||||
environment:
|
||||
sdk: ^3.10.1
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
{
|
||||
"date": "2026-04-11",
|
||||
"name": "Ponshu Room 1.0.28 (2026-04-11)",
|
||||
"version": "v1.0.28",
|
||||
"name": "Ponshu Room 1.0.29 (2026-04-11)",
|
||||
"version": "v1.0.29",
|
||||
"apks": {
|
||||
"eiji": {
|
||||
"lite": {
|
||||
"url": "https://posimai-lab.tail72e846.ts.net/mai/ponshu-room-lite/releases/download/v1.0.28/ponshu_room_consumer_eiji.apk",
|
||||
"url": "https://posimai-lab.tail72e846.ts.net/mai/ponshu-room-lite/releases/download/v1.0.29/ponshu_room_consumer_eiji.apk",
|
||||
"size_mb": 89,
|
||||
"filename": "ponshu_room_consumer_eiji.apk"
|
||||
}
|
||||
},
|
||||
"maita": {
|
||||
"lite": {
|
||||
"url": "https://posimai-lab.tail72e846.ts.net/mai/ponshu-room-lite/releases/download/v1.0.28/ponshu_room_consumer_maita.apk",
|
||||
"url": "https://posimai-lab.tail72e846.ts.net/mai/ponshu-room-lite/releases/download/v1.0.29/ponshu_room_consumer_maita.apk",
|
||||
"size_mb": 89,
|
||||
"filename": "ponshu_room_consumer_maita.apk"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue