mirror of https://github.com/helm/helm
ApplySourceDateEpoch previously only stamped entries with a zero ModTime, but charts loaded from disk (via loader.LoadDir) already have non-zero ModTimes populated from the filesystem. This made the function a no-op in the common helm-package path, defeating reproducible builds. The function now unconditionally overrides every ModTime to the SOURCE_DATE_EPOCH value, which is the correct behaviour for producing bit-for-bit identical archives regardless of filesystem metadata. Additionally, tarFromLocalDir in pkg/downloader/manager.go was writing its SOURCE_DATE_EPOCH warning directly to os.Stderr, which is inconsistent with the rest of Manager that routes user-facing output through m.Out. The function now accepts an io.Writer parameter and the call site passes m.Out. Tests updated to verify that existing (non-zero) timestamps are overridden rather than preserved. Signed-off-by: Maxime Kawawa-Beaudan <maxkawab@gmail.com> Signed-off-by: Maxime Grenu <maxime.grenu@gmail.com>pull/31845/head
parent
f2d339dfa4
commit
81c8a2d844
Loading…
Reference in new issue