Remove the cargo.toml workspace and define common as a library
This commit is contained in:
parent
33493c8991
commit
a372187c8d
9 changed files with 120 additions and 83 deletions
28
backend/deploy.ps1
Normal file
28
backend/deploy.ps1
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
if ($args.Count -lt 1) {
|
||||
$scriptName = [Environment]::GetCommandLineArgs()[1]
|
||||
echo "Usage: $scriptName <destination>"
|
||||
exit 1
|
||||
}
|
||||
|
||||
git pull
|
||||
cargo build --release
|
||||
|
||||
systemctl --user stop www-recipes.service
|
||||
|
||||
$destination=$args[0]
|
||||
|
||||
if (!(Test-Path -Path $destination)) {
|
||||
New-Item -ItemType directory -Path $destination
|
||||
}
|
||||
|
||||
Copy-Item target/release/recipes -Destination $destination
|
||||
|
||||
Copy-Item static -Destination $destination -Recurse -Force
|
||||
|
||||
# Do not overwrite the configuration.
|
||||
if (!(Test-Path -Path $destination/conf.ron)) {
|
||||
Copy-Item conf.ron -Destination $destination
|
||||
}
|
||||
|
||||
systemctl --user start www-recipes.service
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue