-
Notifications
You must be signed in to change notification settings - Fork 0
/
publish.bat
18 lines (17 loc) · 900 Bytes
/
publish.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
REM This file automatically deploys the assemblies to my Raspberry Pi.
REM You'll need to set up SSH key authentication and make changes
REM specific to your environment.
REM
echo Deploying...
dotnet publish --sc -r linux-arm -c Release
ssh pi@iotdisplay sudo systemctl stop iotdisplay
scp pi@iotdisplay:/usr/local/iotdisplay/appsettings.json ../
ssh pi@iotdisplay sudo rm /usr/local/iotdisplay/* /home/pi/epaper/*
scp ./IoTDisplay.Console/bin/Release/net6.0/linux-arm/publish/* pi@iotdisplay:/home/pi/epaper
scp ./IoTDisplay.Api/bin/Release/net6.0/linux-arm/publish/* pi@iotdisplay:/home/pi/epaper
scp ../appsettings.json pi@iotdisplay:/home/pi/epaper/
del ..\appsettings.json
ssh pi@iotdisplay sudo chmod 755 /home/pi/epaper/IoTDisplay.Console /home/pi/epaper/IoTDisplay.Api
ssh pi@iotdisplay sudo cp /home/pi/epaper/* /usr/local/iotdisplay
ssh pi@iotdisplay sudo systemctl start iotdisplay
pause