time deploy/setup
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"runtime"
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
|
"time"
|
||||||
"unicode"
|
"unicode"
|
||||||
|
|
||||||
"github.com/pelletier/go-toml/v2"
|
"github.com/pelletier/go-toml/v2"
|
||||||
@@ -116,12 +117,14 @@ func runSetup() error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
defer closeSSHControlMaster(ctx.serverIP)
|
defer closeSSHControlMaster(ctx.serverIP)
|
||||||
|
start := time.Now()
|
||||||
|
|
||||||
if err := performSetup(ctx); err != nil {
|
if err := performSetup(ctx); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Printf("\nSetup complete; PocketBase should be reachable at https://%s\n", ctx.domain)
|
fmt.Printf("\nSetup complete; PocketBase should be reachable at https://%s\n", ctx.domain)
|
||||||
|
fmt.Printf("Total setup time: %s\n", time.Since(start).Round(time.Millisecond))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -177,6 +180,7 @@ func runDeploy() error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
defer closeSSHControlMaster(ctx.serverIP)
|
defer closeSSHControlMaster(ctx.serverIP)
|
||||||
|
start := time.Now()
|
||||||
|
|
||||||
binaryPath := filepath.Join(ctx.serviceDir, "pocketbase")
|
binaryPath := filepath.Join(ctx.serviceDir, "pocketbase")
|
||||||
exists, err := remoteBinaryExists(ctx.serverIP, binaryPath)
|
exists, err := remoteBinaryExists(ctx.serverIP, binaryPath)
|
||||||
@@ -199,6 +203,7 @@ func runDeploy() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fmt.Printf("\nDeployment complete; PocketBase should be reachable at https://%s\n", ctx.domain)
|
fmt.Printf("\nDeployment complete; PocketBase should be reachable at https://%s\n", ctx.domain)
|
||||||
|
fmt.Printf("Total deployment time: %s\n", time.Since(start).Round(time.Millisecond))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user