拉杆箱消毒机
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
849 B

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. # build project
  2. yarn build
  3. # rename dist to current time, like 20221215121300
  4. $now = Get-Date -Format "yyyyMMddHHmmss"
  5. Rename-Item -Path ./dist -NewName $now
  6. # compress dist to app.zip
  7. Compress-Archive -Path ./$now -DestinationPath ./app.zip -Force
  8. # upload app.zip to server
  9. scp app.zip root@192.168.8.13:/frontend/
  10. # unzip app.zip
  11. ssh root@192.168.8.13 "cd /frontend && unzip app.zip"
  12. # remove old link
  13. ssh root@192.168.8.13 "cd /frontend && rm -f dist"
  14. # create link
  15. ssh root@192.168.8.13 "cd /frontend && ln -s /frontend/$now /frontend/dist"
  16. # remove app.zip
  17. ssh root@192.168.8.13 "cd /frontend && rm -f app.zip"
  18. # restart browser
  19. # ssh root@192.168.8.13 "su zwsd -c 'killall chromium-bin'"
  20. # ssh root@192.168.8.13 "su zwsd -c 'zos_setup.sh --test'"
  21. # remove app.zip
  22. Remove-Item -Path ./app.zip
  23. # remove folder
  24. Remove-Item -Path ./$now -Recurse