this repo has no description
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

build: organize deploy script better

dusk 0833dea0 e2883f9a

+15 -11
+15 -11
deploy.nu
··· 4 4 5 5 path add /nix/var/nix/profiles/default/bin 6 6 7 + def deploy [hostname: string] { 8 + let hooktitle = $"deploy @ ($hostname)" 9 + 10 + let start = date now 11 + secrets/deploy-webhook.nu $hooktitle $"=== deploying ($hostname): started ===\n\n(sys disks | to text)\n\n(sys mem | to text)" 12 + 13 + let result = nix run $".#apps.nixinate.($hostname)" -L --show-trace | complete 14 + let end = date now 15 + 16 + let paste_url = http post --content-type multipart/form-data "https://0x0.st" {file: ($result | to text | into binary), secret: true} 17 + secrets/deploy-webhook.nu $hooktitle $"=== deployed ($hostname): finished ===\n\ntook ($end - $start)\n\nlog: ($paste_url)" $result.exit_code 18 + } 19 + 7 20 def main [msg?: string] { 8 21 try { 9 22 nix run ".#dns" -- push 10 23 } catch { |err| 11 - secrets/deploy-webhook.nu $"=== error pushing dns ===\n\n($err | to text)" 1 24 + secrets/deploy-webhook.nu "dns" $"=== error pushing dns ===\n\n($err | to text)" 1 12 25 } 13 26 14 27 try { ··· 20 33 } 21 34 git commit -m $"($commit_msg) [skip ci]" 22 35 git push 23 - } catch { |err| 24 - secrets/deploy-webhook.nu $"=== error pushing git commit ===\n\n($err | to text)" 1 25 36 } 26 37 27 - let start = date now 28 - secrets/deploy-webhook.nu $"=== deploying wolumonde: started ===\n(sys disks | to text)\n\n(sys mem | to text)" 29 - 30 - let result = nix run ".#apps.nixinate.wolumonde" -L --show-trace | complete 31 - let end = date now 32 - 33 - let paste_url = http post --content-type multipart/form-data "https://0x0.st" {file: ($result | to text | into binary), secret: true} 34 - secrets/deploy-webhook.nu $"=== deployed wolumonde: finished ===\ntook ($end - $start)\n\nlog: ($paste_url)" $result.exit_code 38 + deploy "wolumonde" 35 39 }