upstreamcommit

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package upstreamcommit manages generated component configuration files that pin resolved upstream commits.

Index

Constants

View Source
const DefaultDir = "base/upstream-commits"

DefaultDir is the project-relative directory that holds the generated per-component upstream-commit TOML files.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store reads and writes generated upstream-commit component configuration.

func NewStore

func NewStore(fs opctx.FS, dir string) *Store

NewStore creates a store rooted at dir.

func (*Store) Dir

func (s *Store) Dir() string

Dir returns the generated configuration directory.

func (*Store) Exists

func (s *Store) Exists(componentName string) (bool, error)

Exists reports whether a generated TOML exists for componentName.

func (*Store) FindOrphans

func (s *Store) FindOrphans(
	components map[string]projectconfig.ComponentConfig,
) ([]string, error)

FindOrphans returns generated component TOMLs that do not correspond to an upstream component in components.

func (*Store) Get

func (s *Store) Get(componentName string) (commit string, exists bool, err error)

Get returns the upstream commit in a component's generated TOML file.

func (*Store) Path

func (s *Store) Path(componentName string) (string, error)

Path returns the generated TOML path for componentName.

func (*Store) PruneOrphans

func (s *Store) PruneOrphans(components map[string]projectconfig.ComponentConfig) (int, error)

PruneOrphans removes generated TOMLs that are no longer needed.

func (*Store) Remove

func (s *Store) Remove(componentName string) (bool, error)

Remove deletes the generated TOML for componentName if it exists.

func (*Store) Save

func (s *Store) Save(componentName, upstreamCommit string) error

Save writes a generated component TOML override containing only upstreamCommit.

Jump to

Keyboard shortcuts

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