bundleutil

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetVersionAndRelease added in v1.8.0

func GetVersionAndRelease(b declcfg.Bundle) (*declcfg.VersionRelease, error)

func MetadataFor

func MetadataFor(bundleName string, vr declcfg.VersionRelease) ocv1.BundleMetadata

MetadataFor returns a BundleMetadata for the given bundle name and version/release.

func ParseExplicitRelease added in v1.11.0

func ParseExplicitRelease(version, releaseStr string) (*declcfg.VersionRelease, error)

ParseExplicitRelease parses version and release from separate fields. Build metadata is preserved in the version because with an explicit release field, build metadata serves its proper semver purpose (e.g., git commit, build number). In contrast, ParseLegacyVersionRelease clears build metadata because it interprets build metadata AS the release value for registry+v1 bundles.

func ParseLegacyVersionRelease added in v1.11.0

func ParseLegacyVersionRelease(vStr string) (*declcfg.VersionRelease, error)

ParseLegacyVersionRelease parses a registry+v1 bundle version string and returns a VersionRelease. Some registry+v1 bundles utilize the build metadata field of the semver version as release information (a semver spec violation maintained for backward compatibility). When the bundle version includes build metadata that is parsable as a release, the returned VersionRelease has the build metadata extracted into the Release field, and the Version field has its Build metadata cleared. When the bundle version includes build metadata that is NOT parseable as a release, the returned VersionRelease has its Version set to the full semver version (with build metadata) and its Release left empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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