mirror of
https://github.com/dyzulk/twinpath-hotspot-themes.git
synced 2026-01-26 13:31:54 +07:00
feat: isolate voucher check ui and qr scanner modes
This commit is contained in:
27
deploy.ps1
Normal file
27
deploy.ps1
Normal file
@@ -0,0 +1,27 @@
|
||||
# Deploy Script for Twinpath Hotspot
|
||||
# This script copies production files to a 'dist' folder for easy MikroTik upload.
|
||||
|
||||
$Source = Get-Location
|
||||
$Dest = Join-Path (Split-Path $Source -Parent) "dist\hotspot"
|
||||
|
||||
# Files/Folders to exclude from production
|
||||
$ExcludeFiles = @("README.md", "LICENSE", "deploy.ps1", ".gitignore")
|
||||
$ExcludeDirs = @(".git")
|
||||
|
||||
Write-Host "🚀 Preparing production folder: $Dest" -ForegroundColor Cyan
|
||||
|
||||
# Create destination if it doesn't exist
|
||||
if (!(Test-Path $Dest)) {
|
||||
New-Item -ItemType Directory -Path $Dest -Force | Out-Null
|
||||
}
|
||||
|
||||
# Use Robocopy for efficient syncing (it's faster and handles exclusions well)
|
||||
# /MIR: Mirror directory tree
|
||||
# /XD: Exclude Directories
|
||||
# /XF: Exclude Files
|
||||
# /NFL: No File List (cleaner output)
|
||||
# /NDL: No Directory List (cleaner output)
|
||||
robocopy $Source $Dest /MIR /XD $ExcludeDirs /XF $ExcludeFiles /R:3 /W:5 /NFL /NDL /NP
|
||||
|
||||
$TargetName = Split-Path $Dest -Leaf
|
||||
Write-Host "✅ Deployment ready! You can now drag & drop 'dist\$TargetName' to MikroTik." -ForegroundColor Green
|
||||
Reference in New Issue
Block a user