-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.ps1
More file actions
37 lines (31 loc) · 1.1 KB
/
deploy.ps1
File metadata and controls
37 lines (31 loc) · 1.1 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
34
35
36
37
# NFC Roon Controller - Deploy Script
# Usage: .\deploy.ps1 "commit message"
param(
[string]$Message = "Update"
)
$ProjectDir = "D:\MINSHARA\CODE\nfc-roon-controller"
$PiHost = "pi@192.168.1.60"
$PiDir = "~/nfc-roon"
Write-Host "=== NFC Roon Controller Deploy ===" -ForegroundColor Cyan
# 1. Push to GitHub
Write-Host "`n[1/3] Git push..." -ForegroundColor Yellow
Set-Location $ProjectDir
git add .
git commit -m $Message
git push
# 2. Copy files to Pi (single scp call)
Write-Host "`n[2/3] Copy to Pi..." -ForegroundColor Yellow
scp "$ProjectDir\serveur.py" `
"$ProjectDir\roon_controller.py" `
"$ProjectDir\config.py" `
"$ProjectDir\utils.py" `
"$ProjectDir\nfc_reader.py" `
"$ProjectDir\kindle_display.py" `
"${PiHost}:${PiDir}/"
scp "$ProjectDir\templates\admin.html" `
"$ProjectDir\templates\display.html" `
"${PiHost}:${PiDir}/templates/"
# 3. Restart services on Pi
Write-Host "`n[3/3] Restart Pi services..." -ForegroundColor Yellow
ssh $PiHost "sudo systemctl restart nfc-roon-server && sudo systemctl restart nfc-roon-reader"
Write-Host "`n=== Done ===" -ForegroundColor Green