mirror of
https://github.com/mudler/luet.git
synced 2025-08-31 23:02:16 +00:00
Add package buildtimestamp and luet upgrade --sync
Annotate the package build time when compiling, and use that from the client to force upgrade of packages that changed the artifact, but didn't changed any version. The client can trigger this behavior with `luet upgrade --sync`
This commit is contained in:
@@ -23,6 +23,7 @@ import (
|
||||
"regexp"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/mudler/luet/pkg/helpers"
|
||||
. "github.com/mudler/luet/pkg/logger"
|
||||
@@ -455,6 +456,8 @@ func (cs *LuetCompiler) compileWithImage(image, buildertaggedImage, packageImage
|
||||
|
||||
artifact.SetFiles(filelist)
|
||||
|
||||
artifact.GetCompileSpec().GetPackage().SetBuildTimestamp(time.Now().String())
|
||||
|
||||
err = artifact.WriteYaml(p.GetOutputPath())
|
||||
if err != nil {
|
||||
return artifact, errors.Wrap(err, "Failed while writing metadata file")
|
||||
|
Reference in New Issue
Block a user