feat: improve combination search and offline build
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$projectRoot = Split-Path -Parent $PSScriptRoot
|
||||
$package = Get-Content -LiteralPath (Join-Path $projectRoot 'package.json') -Raw | ConvertFrom-Json
|
||||
$source = Join-Path $projectRoot 'offline-dist'
|
||||
$releaseDirectory = Join-Path $projectRoot 'release'
|
||||
$archive = Join-Path $releaseDirectory ("HolodoriCalc-offline-v{0}.zip" -f $package.version)
|
||||
|
||||
if (-not (Test-Path -LiteralPath $source)) {
|
||||
throw '오프라인 빌드 결과가 없습니다.'
|
||||
}
|
||||
|
||||
New-Item -ItemType Directory -Path $releaseDirectory -Force | Out-Null
|
||||
if (Test-Path -LiteralPath $archive) {
|
||||
Remove-Item -LiteralPath $archive -Force
|
||||
}
|
||||
|
||||
Compress-Archive -Path (Join-Path $source '*') -DestinationPath $archive -CompressionLevel Optimal
|
||||
Write-Output $archive
|
||||
Reference in New Issue
Block a user