X-Git-Url: http://git.euphorik.ch/index.cgi?a=blobdiff_plain;f=deploy.ps1;h=5635894890b4e37dd826416d9e290621273601b4;hb=e329e71ea8768a41734a5df03102825fdb88b011;hp=f9b7dbfa387d6278d71975a4ad90c4470b510526;hpb=34198d80b5aa3fa89f9f7bd6ecdbac1807bd9f4b;p=valheim_web.git diff --git a/deploy.ps1 b/deploy.ps1 old mode 100644 new mode 100755 index f9b7dbf..5635894 --- 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 # 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