X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=deploy.ps1;h=bd431f01540fca32ea8649e873daf16648981bab;hb=HEAD;hp=f9b7dbfa387d6278d71975a4ad90c4470b510526;hpb=9a4fa224d81978e42349bfbc6688933d67d37566;p=valheim_web.git diff --git a/deploy.ps1 b/deploy.ps1 old mode 100644 new mode 100755 index f9b7dbf..bd431f0 --- a/deploy.ps1 +++ b/deploy.ps1 @@ -1,3 +1,5 @@ +#!/usr/bin/env pwsh + if ($args.Count -lt 1) { $scriptName = [Environment]::GetCommandLineArgs()[1] Write-Output "Usage: $scriptName " @@ -7,7 +9,7 @@ if ($args.Count -lt 1) { git pull cargo build --release -systemctl --user stop valheim-web +systemctl --user stop valheim_web $destination=$args[0] @@ -15,15 +17,15 @@ if (!(Test-Path -Path $destination)) { New-Item -ItemType directory -Path $destination } -strip target/release/valheim-web # To reduce the executable size. -Copy-Item target/release/valheim-web -Destination $destination +strip target/release/valheim_web # To reduce the executable size. +Copy-Item target/release/valheim_web -Destination $destination -Copy-Item static -Destination $destination -Recurse -Force +Copy-Item backend/static -Destination $destination -Recurse -Force -Exclude style.css.map # Do not overwrite the configuration. if (!(Test-Path -Path $destination/conf.ron)) { - Copy-Item conf.ron -Destination $destination + Copy-Item backend/conf.ron -Destination $destination } -systemctl --user start valheim-web +systemctl --user start valheim_web