-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate-all.ps1
More file actions
33 lines (28 loc) · 1.27 KB
/
Copy pathupdate-all.ps1
File metadata and controls
33 lines (28 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Update all: restore packages and build.
# Run from: c:\Users\endri\OneDrive\Desktop\work
$ErrorActionPreference = "Stop"
$here = $PSScriptRoot
Write-Host "=== Restore & build ===" -ForegroundColor Cyan
# .NET (PrivacyMonitor)
$csproj = Join-Path $here "wpf-browser\PrivacyMonitor.csproj"
if (Test-Path $csproj) {
Write-Host "Dotnet restore + build: wpf-browser..." -ForegroundColor Yellow
dotnet restore $csproj
dotnet build $csproj --no-restore
Write-Host "WPF build done." -ForegroundColor Green
} else {
Write-Host "PrivacyMonitor.csproj not found, skipping." -ForegroundColor Yellow
}
# Node (browser-update-server)
$serverPackage = Join-Path $here "browser-update-server\server\package.json"
if (Test-Path $serverPackage) {
Write-Host "npm install: browser-update-server/server..." -ForegroundColor Yellow
Set-Location (Join-Path $here "browser-update-server\server")
npm install
Set-Location $here
Write-Host "Server deps done." -ForegroundColor Green
} else {
Write-Host "browser-update-server/server not found, skipping." -ForegroundColor Yellow
}
Write-Host "=== Update all finished ===" -ForegroundColor Green
Write-Host "Next: git add/commit/push (GitHub), or .\update-vps.ps1 (VPS)." -ForegroundColor Gray