사이트 인터랙티브 워크스테이션 확장 + 감사 폴리시 재적용 + 원클릭 릴리스 도구 — 병행 세션 확장분(히어로 3탭 워크스테이션 시뮬레이터, 비교 섹션(기존 방식 vs MEDIABROWSER), 가이드 단축키 섹션(kbd), 스포트라이트 카드, build/release.ps1 원클릭 릴리스(-Publish/-DeploySite), build-remote.ps1 PowerShell 원격 빌드, upload-release-asset.ps1 로컬 실행 지원(.env 자동 로드·-Publish 승격·-Repo), fetch-releases.mjs 인증·폴백)을 수용하고, 덮여 사라진 감사 폴리시를 새 베이스에 재적용: 타이틀 em대시 제거+OG 메타(index/guide), 아이브로우 6→1(장식 점 제거), 히어로 2줄 헤드라인·20단어 서브·CTA 라벨 단일화·신뢰 스트립 제거, 파이프라인 3분리 카드→단일 머신드 레일 재구성, 과장 카피 완화(100%·1초·초고속·완벽), 시뮬레이터 예시 캡션, skip-link·focus-visible·hero__grid min-width:0(모바일 오버플로) 재적용 — 데스크톱/모바일 검증(scrollWidth 375==375, 아이브로우 1, 레일·캡션·탭 3종 확인), deploy-site.ps1 로 재배포 완료

This commit is contained in:
Yun Chan 2026-08-18 10:35:53 +09:00
parent 9c9d9cb024
commit f13914534a
11 changed files with 976 additions and 246 deletions

142
build/release.ps1 Normal file
View file

@ -0,0 +1,142 @@
# MediaBrowser 원클릭 통합 릴리스 & 사이트 배포 스크립트
#
# 동작:
# 1) Windows 설치자(x64, arm64) 빌드 (+ 선택: Android APK, 원격 Linux/macOS 머신 빌드)
# 2) NAS Git(Forgejo)의 공개 릴리스 저장소(Video-Downloader/releases)에 릴리스 생성 및 자산 업로드
# 3) (선택: -DeploySite) releases.json 갱신 및 Cloudflare Pages 배포
#
# 사용 예시:
# ./build/release.ps1 -Version 1.0.0 -Publish -DeploySite
# ./build/release.ps1 -Version 1.0.0-preview -Prerelease
# ./build/release.ps1 -Version 1.0.0 -SkipBuild -Publish -DeploySite
param(
[Parameter(Mandatory=$true)][string]$Version,
[string]$Config = "Release",
[switch]$Publish,
[switch]$Prerelease,
[switch]$SkipBuild,
[switch]$IncludeAndroid,
[switch]$IncludeRemote,
[switch]$DeploySite,
[string]$Notes = "",
[string]$Repo = "Video-Downloader/releases"
)
$ErrorActionPreference = "Stop"
$root = Split-Path -Parent $PSScriptRoot
$outDir = Join-Path $root "out"
Write-Host "======================================================" -ForegroundColor Cyan
Write-Host " MediaBrowser 릴리스 파이프라인 (v$Version)" -ForegroundColor Cyan
Write-Host "======================================================" -ForegroundColor Cyan
# ── 1. .env 환경변수 로드 ────────────────────────────────────
$envFile = Join-Path $root ".env"
if (Test-Path $envFile) {
foreach ($line in Get-Content $envFile) {
if ($line -match '^\s*([A-Za-z0-9_]+)\s*=\s*(.+)$') {
$k = $Matches[1]; $v = $Matches[2].Trim()
if (-not (Get-Item "env:$k" -ErrorAction SilentlyContinue)) {
Set-Item "env:$k" $v
}
}
}
}
$hasAuth = ($env:RELEASE_TOKEN) -or ($env:FORGEJO_TOKEN) -or ($env:FORGEJO_USER -and $env:FORGEJO_PASSWORD)
if (-not $hasAuth) {
throw ".env 에 FORGEJO_TOKEN 또는 FORGEJO_USER/PASSWORD 가 없습니다. Forgejo 인증을 설정하세요."
}
# ── 2. 아티팩트 빌드 ─────────────────────────────────────────
if (-not $SkipBuild) {
Write-Host "`n[1/4] Windows 설치자 빌드 (x64, arm64)" -ForegroundColor Yellow
& (Join-Path $PSScriptRoot "publish.ps1") -Config $Config -Version $Version
if ($LASTEXITCODE -ne 0) { throw "Windows 설치자 빌드 실패" }
if ($IncludeAndroid) {
Write-Host "`n[2/4] Android APK 빌드" -ForegroundColor Yellow
$mobileCsproj = Join-Path $root "VideoDownloader.Mobile\VideoDownloader.Mobile.csproj"
$androidOut = Join-Path $outDir "android"
dotnet publish $mobileCsproj -f net10.0-android -c $Config -p:AndroidPackageFormat=apk -p:CiPackArm64Only=true -o $androidOut
if ($LASTEXITCODE -eq 0) {
$apk = Get-ChildItem (Join-Path $androidOut "*.apk") | Select-Object -First 1
if ($apk) {
$targetApk = Join-Path $outDir "MediaBrowser-$Version-arm64.apk"
Copy-Item $apk.FullName $targetApk -Force
Write-Host "Android APK 생성 완료: $targetApk" -ForegroundColor Green
}
} else {
Write-Warning "Android 빌드 실패 (워크로드 미설치 시 건너뜁니다)"
}
}
if ($IncludeRemote) {
Write-Host "`n[3/4] Linux / macOS 원격 빌드머신 빌드" -ForegroundColor Yellow
$remoteScript = Join-Path $PSScriptRoot "remote\build-remote.sh"
if (Get-Command bash -ErrorAction SilentlyContinue) {
bash $remoteScript all
} else {
Write-Warning "bash 명령어를 찾을 수 없어 원격 빌드를 건너뜁니다."
}
}
} else {
Write-Host "`n[빌드 건너뜀 (-SkipBuild)]" -ForegroundColor DarkGray
}
# ── 3. 수집된 자산 목록 확인 ──────────────────────────────────
$assetsToUpload = @()
$candPatterns = @(
"MediaBrowser-Setup-*.exe",
"MediaBrowser-*-arm64.apk",
"mediabrowser-*.tar.gz"
)
foreach ($pat in $candPatterns) {
Get-ChildItem -Path $outDir -Filter $pat -ErrorAction SilentlyContinue | ForEach-Object {
$assetsToUpload += $_.FullName
}
}
if ($assetsToUpload.Count -eq 0) {
throw "업로드할 릴리스 산출물이 out/ 디렉토리에 없습니다."
}
Write-Host "`n업로드 대상 자산 ($($assetsToUpload.Count)개):" -ForegroundColor Cyan
foreach ($a in $assetsToUpload) {
$f = Get-Item $a
Write-Host (" - {0,-35} ({1:N1} MB)" -f $f.Name, ($f.Length / 1MB))
}
# ── 4. NAS Git (Forgejo) 릴리스 등록 및 업로드 ────────────────
Write-Host "`n[4/4] NAS Git (Forgejo) 릴리스 업로드 ($Repo)" -ForegroundColor Yellow
$tag = "v$Version"
$uploadScript = Join-Path $PSScriptRoot "ci\upload-release-asset.ps1"
$uploadArgs = @{
Tag = $tag
Files = $assetsToUpload
Repo = $Repo
}
if ($Publish) { $uploadArgs["Publish"] = $true }
if ($Notes) { $uploadArgs["Notes"] = $Notes }
$global:LASTEXITCODE = 0
& $uploadScript @uploadArgs
# ── 5. 사이트 배포 (옵션) ────────────────────────────────────
if ($DeploySite) {
Write-Host "`n[추가] Cloudflare Pages 사이트 배포" -ForegroundColor Yellow
$global:LASTEXITCODE = 0
& (Join-Path $PSScriptRoot "deploy-site.ps1")
}
Write-Host "`n======================================================" -ForegroundColor Green
Write-Host " 릴리스 완료: $tag" -ForegroundColor Green
if ($Publish) {
Write-Host " 상태: 정식 공개(Published)" -ForegroundColor Green
} else {
Write-Host " 상태: 초안(Draft) — 웹 UI(https://git.chanpaca.net/$Repo/releases)에서 확인 후 공개 가능" -ForegroundColor Yellow
}
Write-Host "======================================================" -ForegroundColor Green