projects
/
rup.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Automatically create a default file config if it doesn't exist.
[rup.git]
/
deploy.ps1
diff --git
a/deploy.ps1
b/deploy.ps1
index
a88318d
..
b03e439
100755
(executable)
--- a/
deploy.ps1
+++ b/
deploy.ps1
@@
-1,12
+1,21
@@
+if ($args.Count -lt 1) {
+ $scriptName = [Environment]::GetCommandLineArgs()[1]
+ Write-Output "Usage: $scriptName <destination>"
+ exit 1
+}
+
git pull
cargo build --release
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
}
$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
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
}
if (!(Test-Path -Path $destination/conf.ron)) {
Copy-Item conf.ron -Destination $destination
}
+
+systemctl --user start www-rouleunpet.service
+