WIP 시험판 검사 도구: 순번 900 이상의 v 태그 (시험판 Pre-release) 는 정식 판으로 보지 않음 · 정식 판 (-Release) 인데 순번 900 이상이면 실패 (검토 대기)

관리자 지시 (10/19, 28 지적): 시험판에 태그 (예: v2026.10.18_977) 를 단 뒤 같은 APK 를 tool/check_apk.ps1 로 다시 검사하면
"시험판인데 정식 판 v2026.10.18_977 과 같음" 으로 거짓 실패했다 (그 태그를 정식 판으로 봄). 거꾸로 977 APK 에 -Release 를 주면 통과했다.
- check_apk.ps1: 정식 판 태그는 순번 900 미만만. -Release 인데 versionCode 의 순번이 900 이상이면 실패 ("시험판 번호입니다").
- check_windows_build.ps1: 원래 태그를 보지 않아 거짓 실패는 없었다. -Release 인데 순번이 900 이상이면 실패하도록 같은 규칙을 맞춤 (전에는 1000 이상만).

확인 (실제 파일):
- APK 977 (release\test\977): -Release 없이 통과, -Release 면 실패 / APK 001 (정식 판): -Release 통과, -Release 없이 실패 (정식 판 번호).
- Windows 977 (release\test\977\stage): -Release 없이 통과, -Release 면 실패 / Windows 001 (release\stage_v2026.10.18_001): -Release 통과, 없이 실패.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
next4
RyuJongJin 2026-10-19 23:17:25 +09:00
parent 484991cdda
commit ca63bd1fb5
2 changed files with 11 additions and 2 deletions

View File

@ -6,6 +6,8 @@
# - 시험판 번호 (관리자 지시 10/12): 시험판의 versionCode 가 정식 판 (git 태그 v년.월.일_번호) 과 같으면 실패.
# 918 이 --build-number 없이 빌드되어 정식 판 v2026.10.10_001 (261010001) 과 똑같이 보였다 - 사용자 기기에 깔리면 정식 판으로 보이고
# 새 버전 확인도 "최신과 같음" 이 된다. 시험판은 flutter build apk --build-number 9xx 로 빌드한다. 정식 판 APK 는 -Release.
# - 순번 900 이상의 v 태그 (시험판 Pre-release, 예: v2026.10.18_977) 는 정식 판으로 보지 않는다 (관리자 지시 10/19, 28 지적:
# 시험판에 태그를 단 뒤 같은 APK 를 다시 검사하면 "정식 판 번호와 같음" 으로 거짓 실패). 정식 판 (-Release) 인데 순번이 900 이상이면 실패.
# 사용: powershell -ExecutionPolicy Bypass -File tool\check_apk.ps1 -Apk build\app\outputs\flutter-apk\app-release.apk [-Release]
param(
[Parameter(Mandatory = $true)][string]$Apk,
@ -68,8 +70,13 @@ if ($badging -notmatch "versionCode='(\d+)' versionName='([^']*)'") { throw "ver
$code = [long]$Matches[1]; $vname = $Matches[2]
$tags = @(git -C $app tag --list 'v*' 2>$null)
$same = @(foreach ($t in $tags) {
if ($t -match '^v(\d+)\.(\d+)\.(\d+)_(\d+)$' -and ([long]$Matches[1] % 100) * 10000000 + [long]$Matches[2] * 100000 + [long]$Matches[3] * 1000 + [long]$Matches[4] -eq $code) { $t }
# 순번 900 이상 = 시험판 태그 (정식 판이 아님)
if ($t -match '^v(\d+)\.(\d+)\.(\d+)_(\d+)$' -and [long]$Matches[4] -lt 900 -and
([long]$Matches[1] % 100) * 10000000 + [long]$Matches[2] * 100000 + [long]$Matches[3] * 1000 + [long]$Matches[4] -eq $code) { $t }
})
if ($Release -and ($code % 1000) -ge 900) {
$bad += "정식 판 (-Release) 인데 versionCode $code ($vname) 의 순번이 $($code % 1000) - 시험판 번호입니다 (정식 판은 --build-number 없이, pubspec 의 +순번)"
}
if (-not $Release -and $same) {
$bad += "시험판인데 versionCode $code ($vname) 가 정식 판 $($same -join ', ') 과 같음 - flutter build apk --build-number 9xx 로 다시 빌드 (정식 판이면 -Release)"
}

View File

@ -3,6 +3,8 @@
# - 시험판: flutter build windows --build-number <년월일 6자리><순번 3자리> (예: 261012972 → "v2026.10.12_972", APK versionCode 와 같은 번호).
# 번호가 1000 보다 작으면 (정식 판 번호, 예: +1) 실패 - 972 Windows 가 +1 로 나가 정식 판 v2026.10.12_001 과 구별되지 않았다.
# - 정식 판 (-Release): 번호가 1000 보다 작아야 한다 (시험 번호가 정식 zip 에 들어가지 않게).
# - 정식 판 (-Release) 의 순번이 900 이상이면 실패 (900 이상은 시험판 순번 - check_apk.ps1 과 같은 규칙, 관리자 지시 10/19).
# 이 검사는 git 태그를 보지 않으므로 시험판 태그를 단 뒤 다시 검사해도 거짓 실패가 없다.
# 사용: powershell -ExecutionPolicy Bypass -File tool\check_windows_build.ps1 -Dir <배포 폴더 (Lib 가 있는 곳)> [-Release]
param(
[Parameter(Mandatory = $true)][string]$Dir,
@ -16,7 +18,7 @@ if ($ver -notmatch '^(\d+)\.(\d+)\.(\d+)\+(\d+)$') { throw "판 번호를 읽을
$build = [long]$Matches[4]
$shown = '{0}.{1:00}.{2:00}_{3:000}' -f [int]$Matches[1], [int]$Matches[2], [int]$Matches[3], ($build % 1000)
if ($Release) {
if ($build -ge 1000) { throw "정식 판인데 시험 번호입니다: $ver (화면 v$shown). --build-number 없이 (pubspec 의 +순번) 빌드하세요" }
if ($build -ge 900) { throw "정식 판인데 시험 번호입니다: $ver (화면 v$shown). --build-number 없이 (pubspec 의 +순번) 빌드하세요" }
} elseif ($build -lt 1000) {
throw ("시험판인데 정식 판 번호입니다: $ver (화면 v$shown - 정식 판과 같게 보임).`n" +
"flutter build windows --release --build-number <년월일><순번 3자리> (예: 261012972) 로 다시 빌드하세요")