X-Git-Url: http://git.euphorik.ch/?p=rup.git;a=blobdiff_plain;f=deploy.ps1;h=31b5a829a709d2742ed00efa49d782fcad33e8ab;hp=a88318d940b8abda044d53084e78dce89a3740c3;hb=HEAD;hpb=c3ee58ede5ab40d77678d51c3a9a95d1dcb66279 diff --git a/deploy.ps1 b/deploy.ps1 index a88318d..b03e439 100755 --- a/deploy.ps1 +++ b/deploy.ps1 @@ -1,12 +1,21 @@ +if ($args.Count -lt 1) { + $scriptName = [Environment]::GetCommandLineArgs()[1] + Write-Output "Usage: $scriptName " + exit 1 +} + git pull cargo build --release +systemctl --user stop www-rouleunpet.service + $destination=$args[0] 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 +25,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 +