diff options
author | xengineering <me@xengineering.eu> | 2024-07-30 18:41:55 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2024-07-30 18:41:55 +0200 |
commit | 35a716859e07e4b05032df327196b707e377f769 (patch) | |
tree | 87e324207ff8731d196f6e2c9ca1768d81b1d0e3 | |
parent | 9a21437358bea8f347e98cba564a5b214bb6607b (diff) | |
download | craft-35a716859e07e4b05032df327196b707e377f769.tar craft-35a716859e07e4b05032df327196b707e377f769.tar.zst craft-35a716859e07e4b05032df327196b707e377f769.zip |
Execute VM startup and source checkout in paralleloffline
This speeds the build process a bit up.
-rw-r--r-- | main.go | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -42,15 +42,8 @@ func main() { log.Println("Starting craft") defer log.Println("Exiting craft") - source, err := os.MkdirTemp("", "*-craft") - if err != nil { - log.Fatal(err) - } - defer os.RemoveAll(source) - checkout(repo, commit, source) - vm := qemu() - err = vm.Start() + err := vm.Start() if err != nil { log.Fatal(err) } @@ -60,6 +53,14 @@ func main() { log.Fatal(err) } }() + + source, err := os.MkdirTemp("", "*-craft") + if err != nil { + log.Fatal(err) + } + defer os.RemoveAll(source) + checkout(repo, commit, source) + waitBoot() upload(source) |