Documentation ¶
Overview ¶
Package nfpmwrapper is an internal package used by rules_nfpm in order to connect bazel to NFPM.
nfpmwrapper is not meant for use outside of rules_nfpm, but is documented to provide information on package config template data and internals.
Index ¶
Constants ¶
View Source
const ( FormatDeb = "deb" FormatRPM = "rpm" )
Package formats supported by this wrapper and NFPM.
Variables ¶
View Source
var ExtensionFormatMap = map[string]string{ ".deb": FormatDeb, ".rpm": FormatRPM, }
ExtensionFormatMap is a map of package extension to package format.
Functions ¶
This section is empty.
Types ¶
type Cmd ¶
type Cmd struct { // Config is the path to a config file that will be used as a template. Config string `name:"config" type:"existingfile"` // StableStatus and Volatile status are paths to bazel's workspace status // files. StableStatus string `name:"stable-status" type:"existingfile"` VolatileStatus string `name:"volatile-status" type:"existingfile"` // Deps is an array of label-path pairs, delimited by an equals (=) sign. Deps []string `name:"dep"` // Output is the desired path for the generated package. The extension is // used to lookup the package format in ExtensionFormatMap. Output string `arg` }
Cmd is a struct defining parameters for templating an NFPM config and generating a package using NFPM.
type ConfigTemplateData ¶
type ConfigTemplateData struct { // StableStatus contains the key-value pairs in stable-status.txt. See // https://docs.bazel.build/versions/master/user-manual.html#workspace_status // for details. StableStatus map[string]string // VolatileStatus contains the key-value pairs in volatile-status.txt. See // https://docs.bazel.build/versions/master/user-manual.html#workspace_status // for details. VolatileStatus map[string]string // Dependencies is a map of a bazel dependencies. The map key is the label // of the dependency, and the map value is the dependency's path. For // example, "//path/to/package:target": "path/to/output". Dependencies map[string]string }
ConfigTemplateData is the data available for use inside of the NFPM YAML config.
Click to show internal directories.
Click to hide internal directories.