MCPcopy Index your code
hub / github.com/helm/helm / newPluginPackageCmd

Function newPluginPackageCmd

pkg/cmd/plugin_package.go:53–75  ·  view source on GitHub ↗
(out io.Writer)

Source from the content-addressed store, hash-verified

51}
52
53func newPluginPackageCmd(out io.Writer) *cobra.Command {
54 o := &pluginPackageOptions{}
55
56 cmd := &cobra.Command{
57 Use: "package [PATH]",
58 Short: "package a plugin directory into a plugin archive",
59 Long: pluginPackageDesc,
60 Args: require.ExactArgs(1),
61 RunE: func(_ *cobra.Command, args []string) error {
62 o.pluginPath = args[0]
63 return o.run(out)
64 },
65 }
66
67 f := cmd.Flags()
68 f.BoolVar(&o.sign, "sign", true, "use a PGP private key to sign this plugin")
69 f.StringVar(&o.key, "key", "", "name of the key to use when signing. Used if --sign is true")
70 f.StringVar(&o.keyring, "keyring", defaultKeyring(), "location of a public keyring")
71 f.StringVar(&o.passphraseFile, "passphrase-file", "", "location of a file which contains the passphrase for the signing key. Use \"-\" to read from stdin.")
72 f.StringVarP(&o.destination, "destination", "d", ".", "location to write the plugin tarball.")
73
74 return cmd
75}
76
77func (o *pluginPackageOptions) run(out io.Writer) error {
78 // Check if the plugin path exists and is a directory

Callers 1

newPluginCmdFunction · 0.85

Calls 3

runMethod · 0.95
ExactArgsFunction · 0.92
defaultKeyringFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…