mirror of
https://github.com/mudler/luet.git
synced 2025-09-08 02:29:38 +00:00
Replace Yaml with YAML in function, add debug output when extracting runtime data
This commit is contained in:
@@ -80,7 +80,7 @@ Afterwards, you can use the content generated and associate it with a tree and a
|
|||||||
}
|
}
|
||||||
a.Files = filelist
|
a.Files = filelist
|
||||||
a.CompileSpec.GetPackage().SetBuildTimestamp(time.Now().String())
|
a.CompileSpec.GetPackage().SetBuildTimestamp(time.Now().String())
|
||||||
err = a.WriteYaml(dst)
|
err = a.WriteYAML(dst)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
Fatal("failed writing metadata yaml file for ", packageName, ": ", err.Error())
|
Fatal("failed writing metadata yaml file for ", packageName, ": ", err.Error())
|
||||||
}
|
}
|
||||||
|
@@ -442,7 +442,7 @@ func (cs *LuetCompiler) genArtifact(p *compilerspec.LuetCompilationSpec, builder
|
|||||||
a.CompileSpec = p
|
a.CompileSpec = p
|
||||||
a.CompileSpec.GetPackage().SetBuildTimestamp(time.Now().String())
|
a.CompileSpec.GetPackage().SetBuildTimestamp(time.Now().String())
|
||||||
|
|
||||||
err = a.WriteYaml(p.GetOutputPath())
|
err = a.WriteYAML(p.GetOutputPath())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return a, errors.Wrap(err, "Failed while writing metadata file")
|
return a, errors.Wrap(err, "Failed while writing metadata file")
|
||||||
}
|
}
|
||||||
@@ -472,7 +472,7 @@ func (cs *LuetCompiler) genArtifact(p *compilerspec.LuetCompilationSpec, builder
|
|||||||
a.Files = filelist
|
a.Files = filelist
|
||||||
a.CompileSpec.GetPackage().SetBuildTimestamp(time.Now().String())
|
a.CompileSpec.GetPackage().SetBuildTimestamp(time.Now().String())
|
||||||
|
|
||||||
err = a.WriteYaml(p.GetOutputPath())
|
err = a.WriteYAML(p.GetOutputPath())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return a, errors.Wrap(err, "Failed while writing metadata file")
|
return a, errors.Wrap(err, "Failed while writing metadata file")
|
||||||
}
|
}
|
||||||
|
@@ -102,7 +102,7 @@ func (a *PackageArtifact) Verify() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *PackageArtifact) WriteYaml(dst string) error {
|
func (a *PackageArtifact) WriteYAML(dst string) error {
|
||||||
// First compute checksum of artifact. When we write the yaml we want to write up-to-date informations.
|
// First compute checksum of artifact. When we write the yaml we want to write up-to-date informations.
|
||||||
err := a.Hash()
|
err := a.Hash()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -115,7 +115,7 @@ func (a *PackageArtifact) WriteYaml(dst string) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrapf(err, "getting runtime package for '%s'", a.CompileSpec.Package.HumanReadableString())
|
return errors.Wrapf(err, "getting runtime package for '%s'", a.CompileSpec.Package.HumanReadableString())
|
||||||
}
|
}
|
||||||
|
Debug(fmt.Sprintf("embedding runtime package (%s) definition to artifact metadata", a.CompileSpec.Package.HumanReadableString()))
|
||||||
a.Runtime = runtime
|
a.Runtime = runtime
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user