diff --git a/internal/dl/dl.go b/internal/dl/dl.go index 354a3f4..6921ecd 100644 --- a/internal/dl/dl.go +++ b/internal/dl/dl.go @@ -209,9 +209,10 @@ func Download(ctx context.Context, opts Options) (err error) { } if ok && !updated { - log.Info("Source found in cache, linked to destination").Str("source", opts.Name).Stringer("type", t).Send() + log.Info("Source found in cache and linked to destination").Str("source", opts.Name).Stringer("type", t).Send() return nil } else if ok { + log.Info("Source updated and linked to destination").Str("source", opts.Name).Stringer("type", t).Send() return nil } } else { diff --git a/internal/dl/git.go b/internal/dl/git.go index f4b3adc..f07109b 100644 --- a/internal/dl/git.go +++ b/internal/dl/git.go @@ -177,6 +177,9 @@ func (GitDownloader) Update(opts Options) (bool, error) { po.RecurseSubmodules = git.DefaultSubmoduleRecursionDepth } + m, err := getManifest(opts.Destination) + manifestOK := err == nil + err = w.Pull(po) if errors.Is(err, git.NoErrAlreadyUpToDate) { return false, nil @@ -184,5 +187,12 @@ func (GitDownloader) Update(opts Options) (bool, error) { return false, err } + if manifestOK { + err = writeManifest(opts.Destination, m) + if err != nil { + return true, err + } + } + return true, nil }