X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=deploy.ps1;h=31b5a829a709d2742ed00efa49d782fcad33e8ab;hb=f43bab0b61b36e53135569727476fc6f39a3deec;hp=a88318d940b8abda044d53084e78dce89a3740c3;hpb=c3ee58ede5ab40d77678d51c3a9a95d1dcb66279;p=rup.git diff --git a/deploy.ps1 b/deploy.ps1 index a88318d..31b5a82 100755 --- a/deploy.ps1 +++ b/deploy.ps1 @@ -1,3 +1,12 @@ +if ($args.Count -lt 1) { + $scriptName = [Environment]::GetCommandLineArgs()[1] + Write-Output "Usage: $scriptName " + exit 1 +} + + +systemctl --user stop www-rouleunpet.service + git pull cargo build --release @@ -7,6 +16,7 @@ if (!(Test-Path -Path $destination)) { New-Item -ItemType directory -Path $destination } +strip target/release/rup # To reduce the executable size. Copy-Item target/release/rup -Destination $destination Copy-Item key.secret -Destination $destination @@ -16,3 +26,6 @@ Copy-Item static -Destination $destination -Recurse -Force if (!(Test-Path -Path $destination/conf.ron)) { Copy-Item conf.ron -Destination $destination } + +systemctl --user start www-rouleunpet.service +