Initial commit: abyssVpn project
- Tauri desktop app (apps/desktop) - Python Django API service (services/api) - Deployment scripts and docs
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
param(
|
||||
[Parameter(Mandatory = $true)][string]$ProjectRoot,
|
||||
[Parameter(Mandatory = $true)][string]$OutputZip
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$apiDir = Join-Path $ProjectRoot "services\api"
|
||||
$stageRoot = Join-Path $env:TEMP ("abyssinfo-api-stage-" + [guid]::NewGuid().ToString("N"))
|
||||
$stageApi = Join-Path $stageRoot "api"
|
||||
|
||||
New-Item -ItemType Directory -Force -Path $stageApi | Out-Null
|
||||
|
||||
$excludeDirs = @(".venv", "__pycache__", "staticfiles")
|
||||
$excludeFiles = @("db.sqlite3")
|
||||
|
||||
Get-ChildItem -LiteralPath $apiDir -Force | ForEach-Object {
|
||||
if ($_.PSIsContainer) {
|
||||
if ($excludeDirs -notcontains $_.Name) {
|
||||
Copy-Item -LiteralPath $_.FullName -Destination $stageApi -Recurse -Force
|
||||
}
|
||||
} elseif ($excludeFiles -notcontains $_.Name) {
|
||||
Copy-Item -LiteralPath $_.FullName -Destination $stageApi -Force
|
||||
}
|
||||
}
|
||||
|
||||
if (Test-Path -LiteralPath $OutputZip) {
|
||||
Remove-Item -LiteralPath $OutputZip -Force
|
||||
}
|
||||
|
||||
Compress-Archive -Path (Join-Path $stageApi "*") -DestinationPath $OutputZip -Force
|
||||
Remove-Item -LiteralPath $stageRoot -Recurse -Force
|
||||
|
||||
Write-Host "[AbyssInfo] Packaged API to $OutputZip"
|
||||
Reference in New Issue
Block a user