bundle

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package bundle produces deterministic, distribution-ready installer package tarballs. The output is the input to `installer push` and is what an OCI registry stores as a single layer of a native installer artifact.

Determinism: same source tree → byte-identical .tgz, regardless of mtimes, uids, host platform, or walk order. This is what makes signing and digest-pinning meaningful.

Index

Constants

View Source
const IgnoreFile = ".installerignore"

IgnoreFile is the name of the per-package ignore file (gitignore syntax).

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	// Digest is the sha256 of the gzipped tar, hex-encoded (no "sha256:" prefix).
	Digest string
	// Files is the list of paths included, in tar order.
	Files []string
	// Size is the size of the .tgz in bytes.
	Size int64
}

Result is the outcome of a Bundle call.

func Bundle

func Bundle(srcDir, dstFile string) (*Result, error)

Bundle writes a deterministic .tgz of srcDir to dstFile.

Refuses to include:

  • any file matching *.env.secret anywhere in the tree
  • anything under <srcDir>/out/
  • anything matched by <srcDir>/.installerignore (gitignore syntax)
  • .git/, .DS_Store (default ignores; not configurable)

dstFile's parent directory is created if needed; the file is replaced if it exists.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL