Merge branch 'master' of euphorik.ch:rup into master
[rup.git] / deploy.ps1
index 219d4ee..b03e439 100755 (executable)
@@ -1,21 +1,21 @@
 if ($args.Count -lt 1) {
    $scriptName = [Environment]::GetCommandLineArgs()[1]
-   echo "Usage: $scriptName <destination>"
+   Write-Output "Usage: $scriptName <destination>"
    exit 1
 }
 
-
-systemctl --user stop www-rouleunpet.service
-
 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