Replace Rusqlite by Sqlx and Actix by Axum (A lot of changes)

This commit is contained in:
Greg Burri 2024-11-03 10:13:31 +01:00
parent 57d7e7a3ce
commit 980c5884a4
28 changed files with 2860 additions and 2262 deletions

View file

@ -1,18 +1,20 @@
def main [host: string, destination: string, ssh_key: path] {
let ssh_args = [-i $ssh_key $host]
let scp_args = [-r -i $ssh_key]
let target = "aarch64-unknown-linux-gnu" # For raspberry pi zero 1: "arm-unknown-linux-gnueabihf"
# For raspberry pi zero 1: "arm-unknown-linux-gnueabihf"
let target = "aarch64-unknown-linux-gnu"
def invoke_ssh [command: list] {
let args = $ssh_args ++ $command
print $"Executing: ssh ($args)"
ssh $args
ssh ...$args
}
def copy_ssh [source: string, destination: string] {
let args = $scp_args ++ [$source $"($host):($destination)"]
print $"Executing: scp ($args)"
scp $args
scp ...$args
}
cargo build --target $target --release
@ -25,4 +27,3 @@ def main [host: string, destination: string, ssh_key: path] {
invoke_ssh [sudo systemctl start recipes]
print "Deployment finished"
}