added crontab. this is a test for viability
This commit is contained in:
28
deploy.nu
28
deploy.nu
@@ -4,11 +4,19 @@ def main [] {
|
||||
main run
|
||||
}
|
||||
|
||||
def "main build" [] {
|
||||
let config = get-config
|
||||
build $config
|
||||
}
|
||||
|
||||
def "main push" [] {
|
||||
let config = get-config
|
||||
push $config
|
||||
}
|
||||
|
||||
def "main run" [] {
|
||||
let config = get-config
|
||||
nix build $".#($config | get target_platform)"
|
||||
scp result/bin/snooze-pal ($config | get target_machine):bin/snooze-pal
|
||||
ssh ($config | get target_machine) "chmod +rwx bin/snooze-pal && bin/snooze-pal"
|
||||
run $config
|
||||
}
|
||||
|
||||
def get-config [] {
|
||||
@@ -18,3 +26,17 @@ def get-config [] {
|
||||
return (open deploy.config.toml)
|
||||
}
|
||||
}
|
||||
|
||||
def build [config] {
|
||||
nix build $".#($config | get target_platform)"
|
||||
}
|
||||
|
||||
def push [config] {
|
||||
build $config
|
||||
scp result/bin/snooze-pal ($config | get target_machine):bin/snooze-pal
|
||||
}
|
||||
|
||||
def run [config] {
|
||||
push $config
|
||||
ssh ($config | get target_machine) "chmod +rwx bin/snooze-pal && bin/snooze-pal"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user