Skip to content

Commit 52dcabd

Browse files
authored
fix: 최초 설치 진행상태 즉시 표시
설치 시작부터 진행상태를 즉시 표시하고 안정 starter 버전 호환 및 기존 설치 안전성 검증 계보를 main에 통합합니다.
2 parents 2e71d60 + cc6cff9 commit 52dcabd

6 files changed

Lines changed: 586 additions & 271 deletions

File tree

.github/workflows/phase-acceptance.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
installer-locale:
1515
name: Installer locale / ${{ matrix.os }}
1616
runs-on: ${{ matrix.os }}
17+
timeout-minutes: 45
1718
strategy:
1819
fail-fast: false
1920
matrix:
@@ -52,13 +53,18 @@ jobs:
5253
if ($errors.Count) { throw ($errors | Out-String) }
5354
5455
- name: Run installer fault and locale acceptance
56+
env:
57+
CONTEXA_LIFECYCLE_REPEATS: '20'
58+
CONTEXA_FAULT_REPEATS: '5'
5559
run: >-
5660
node -e "const f=require('fs'),c=require('child_process');const r=c.spawnSync(process.execPath,['--test','test/installer-runtime.test.js'],{encoding:'utf8',windowsHide:true});const out=(r.stdout||'')+(r.stderr||'');f.writeFileSync('installer-runtime.tap',out);process.stdout.write(out);process.exit(r.status===null?1:r.status)"
5761
5862
- name: Run the full installer fault matrix with PowerShell 7
5963
if: runner.os == 'Windows'
6064
env:
6165
CONTEXA_TEST_POWERSHELL: pwsh.exe
66+
CONTEXA_LIFECYCLE_REPEATS: '20'
67+
CONTEXA_FAULT_REPEATS: '5'
6268
run: >-
6369
node -e "const f=require('fs'),c=require('child_process');const r=c.spawnSync(process.execPath,['--test','test/installer-runtime.test.js'],{encoding:'utf8',windowsHide:true});const out=(r.stdout||'')+(r.stderr||'');f.writeFileSync('installer-runtime-pwsh.tap',out);process.stdout.write(out);process.exit(r.status===null?1:r.status)"
6470
@@ -122,6 +128,7 @@ jobs:
122128
CONTEXA_SKIP_PATH_UPDATE: '1'
123129
run: |
124130
set -euo pipefail
131+
test "$(id -u)" -ne 0
125132
expected_current="${CONTEXA_PHASE_TAG#v}"
126133
expected_previous="${CONTEXA_PREVIOUS_TAG#v}"
127134
CONTEXA_VERSION="$CONTEXA_PREVIOUS_TAG" sh ./install.sh

install.ps1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,8 @@ function Get-TargetRelease {
246246
if ($version -notmatch '^v[0-9A-Za-z][0-9A-Za-z._-]*$' -or $cliVersion -ne $version.Substring(1)) {
247247
throw 'Signed channel manifest tag and CLI version do not match.'
248248
}
249-
if (-not $starterVersion.EndsWith('-SNAPSHOT')) {
250-
throw 'Signed snapshot channel requires a SNAPSHOT starter version.'
249+
if ($starterVersion -notmatch '^[0-9]+\.[0-9]+\.[0-9]+(?:-[0-9A-Za-z][0-9A-Za-z.-]*)?$') {
250+
throw 'Signed channel manifest starter version is invalid.'
251251
}
252252
if ($releaseManifestSha256 -notmatch '^[0-9a-f]{64}$') {
253253
throw 'Signed channel manifest release digest is invalid.'
@@ -525,11 +525,13 @@ function Invoke-ContexaInstaller {
525525
throw ((Select-InstallerText 'Unsupported CONTEXA_INSTALL_ACTION' '7KeA7JuQ7ZWY7KeAIOyViuuKlCBDT05URVhBX0lOU1RBTExfQUNUSU9O') + ': ' + $action)
526526
}
527527

528+
Write-Host (' ' + (Select-InstallerText 'Starting Contexa CLI installation.' 'Q29udGV4YSBDTEkg7ISk7LmY66W8IOyLnOyeke2VqeuLiOuLpC4='))
528529
$downloadBase = if ([string]::IsNullOrWhiteSpace($env:CONTEXA_RELEASE_DOWNLOAD_BASE)) { $script:DefaultDownloadBase } else { $env:CONTEXA_RELEASE_DOWNLOAD_BASE.TrimEnd('/') }
529530
$targetRelease = Get-TargetRelease $downloadBase
530531
$version = $targetRelease.ReleaseTag
531532
$expectedCliVersion = $targetRelease.CliVersion
532533
$releaseBase = $downloadBase + '/' + $version
534+
Write-Host (' ' + ((Select-InstallerText 'Release {0} found. Checking authenticity...' '66a066as7IqkIHswfeydhCDtmZXsnbjtlojsirXri4jri6QuIOyLoOuisOyEseydhCDqsoDspp3tlZjripQg7KSR7J6F64uI64ukLi4u') -f $version))
533535

534536
$manifestBytes = Invoke-BoundedDownload ($releaseBase + '/release-manifest.json')
535537
$signatureBytes = Invoke-BoundedDownload ($releaseBase + '/release-manifest.json.sig')
@@ -591,6 +593,7 @@ function Invoke-ContexaInstaller {
591593
$hadOriginal = Test-Path -LiteralPath $finalPath -PathType Leaf
592594
$replacementStarted = $false
593595
try {
596+
Write-Host (' ' + (Select-InstallerText 'Downloading Contexa CLI and verifying the file...' 'Q29udGV4YSBDTEnrpbwg64uk7Jq066Gc65Oc7ZWY6rOgIO2MjOydvCDrrLTqsrDshLHsnYQg6rKA7Kad7ZWY64qUIOykkeyeheuLiOuLpC4uLg=='))
594597
$binaryBytes = Invoke-BoundedDownload ($releaseBase + '/' + $asset.file)
595598
[System.IO.File]::WriteAllBytes($temporaryPath, $binaryBytes)
596599
Write-InstallerTransaction $markerPath 'DOWNLOADED' $finalPath $backupPath $temporaryPath $expectedCliVersion $hadOriginal

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ else
496496
CHANNEL_RELEASE_MANIFEST_SHA=$(manifest_string_value "$CHANNEL_MANIFEST_FILE" releaseManifestSha256)
497497
[ "$RESOLVED_CHANNEL" = snapshot ] || fail "Signed channel manifest is not the snapshot channel."
498498
[ "$CHANNEL_CLI_VERSION" = "${VERSION#v}" ] || fail "Signed channel manifest tag and CLI version do not match."
499-
case "$CHANNEL_STARTER_VERSION" in *-SNAPSHOT) ;; *) fail "Signed snapshot channel requires a SNAPSHOT starter version." ;; esac
499+
printf '%s\n' "$CHANNEL_STARTER_VERSION" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z][0-9A-Za-z.-]*)?$' || fail "Signed channel manifest starter version is invalid."
500500
printf '%s\n' "$CHANNEL_RELEASE_MANIFEST_SHA" | grep -Eq '^[0-9a-f]{64}$' || fail "Signed channel manifest release digest is invalid."
501501
printf '%s\n' "$CHANNEL_SOURCE_COMMIT" | grep -Eq '^[0-9a-f]{40}$' || fail "Signed channel manifest source commit is invalid."
502502
fi

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "install-ctxa",
33
"private": true,
4-
"version": "0.1.2-phase5.1",
4+
"version": "0.1.3",
55
"scripts": {
66
"test": "node --test test/*.test.js"
77
}

0 commit comments

Comments
 (0)