2024-07-13 00:48:01 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import "log"
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
cfg := readConfig()
|
|
|
|
log.Println("Reading config")
|
2024-07-13 01:31:33 +00:00
|
|
|
log.Printf(" .. host = %v", cfg.HostName)
|
|
|
|
log.Printf(" .. app = %v", cfg.AppName)
|
2024-07-13 00:48:01 +00:00
|
|
|
|
|
|
|
svc := NewServices(cfg)
|
|
|
|
|
|
|
|
if err := svc.AddPrivateKey(); err != nil {
|
|
|
|
log.Fatal(err)
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := svc.ConfigureSSH(); err != nil {
|
|
|
|
log.Fatal(err)
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := svc.PushRepository(); err != nil {
|
|
|
|
log.Fatal(err)
|
|
|
|
}
|
|
|
|
}
|