Browse Source

更新发布脚本

master
sige 1 year ago
parent
commit
f108e5ce14
  1. 12
      publish.ps1

12
publish.ps1

@ -1,3 +1,14 @@
Param(
[String]$Exec="Deploy"
)
if ( $Exec -eq "DevDisable" ) {
ssh root:zwsd@192.168.8.10 "rm /var/zapp_flag/chrome_in_test_mode";
ssh root:zwsd@192.168.8.10 "reboot"
} elseif ( $Exec -eq "DevEnable" ) {
ssh root:zwsd@192.168.8.10 "touch /var/zapp_flag/chrome_in_test_mode";
ssh root:zwsd@192.168.8.10 "reboot"
} elseif ( $Exec -eq "Deploy" ) {
# build project
yarn build
# rename dist to current time, like 20221215121300
@ -18,3 +29,4 @@ ssh root:zwsd@192.168.8.10 "cd /frontend && rm -f app.zip"
Remove-Item -Path ./app.zip
# remove folder
Remove-Item -Path ./$now -Recurse
}
Loading…
Cancel
Save