Documentation
¶
Overview ¶
Package files provides utilities for reading and updating version files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadVersion ¶
ReadVersion reads the version from a VERSION file.
func UpdateYAMLFile ¶
func UpdateYAMLFile(cfg VersionFileConfig, version string) error
UpdateYAMLFile updates a specific path in a YAML file with a new version. It preserves the original file formatting including comments and structure.
func WriteVersion ¶
WriteVersion writes a version to a VERSION file.
Types ¶
type VersionFileConfig ¶
type VersionFileConfig struct {
File string `json:"file"`
Path string `json:"path"`
Prefix string `json:"prefix,omitempty"`
}
VersionFileConfig defines a YAML file and the path to update with the new version.
Click to show internal directories.
Click to hide internal directories.