X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=deploy.ps1;h=b03e439c45546fb0127deda019491b5b5dd03d8a;hb=HEAD;hp=a88318d940b8abda044d53084e78dce89a3740c3;hpb=c3ee58ede5ab40d77678d51c3a9a95d1dcb66279;p=rup.git 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 +