fix: include restic binary in alpine and scratch docker images

This commit is contained in:
Gareth George
2024-03-30 08:16:35 +00:00
parent c32874c1d6
commit f7bd9f7d0a
5 changed files with 38 additions and 30 deletions

View File

@@ -30,16 +30,24 @@ import (
"golang.org/x/net/http2/h2c"
)
var InstallDepsOnly = flag.Bool("install-deps-only", false, "install dependencies and exit")
func main() {
flag.Parse()
ctx, cancel := context.WithCancel(context.Background())
go onterm(cancel)
resticPath, err := resticinstaller.FindOrInstallResticBinary()
if err != nil {
zap.S().Fatalf("Error finding or installing restic: %v", err)
}
if *InstallDepsOnly {
zap.S().Info("Dependencies installed, exiting")
return
}
ctx, cancel := context.WithCancel(context.Background())
go onterm(cancel)
// Load the configuration
configStore := createConfigProvider()
cfg, err := configStore.Get()