OCI docs improvements
Co-authored-by: Kingdon Barrett <kingdon@weave.works> Co-authored-by: Sunny <darkowlzz@protonmail.com> Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
@@ -28,11 +28,11 @@ import (
|
||||
var buildArtifactCmd = &cobra.Command{
|
||||
Use: "artifact",
|
||||
Short: "Build artifact",
|
||||
Long: `The build artifact command creates an tgz file with the manifests from the given directory.`,
|
||||
Long: `The build artifact command creates a tgz file with the manifests from the given directory.`,
|
||||
Example: ` # Build the given manifests directory into an artifact
|
||||
flux build artifact --path ./path/to/local/manifests --output ./path/to/artifact.tgz
|
||||
|
||||
# List the files bundles in the artifact
|
||||
# List the files bundled in the artifact
|
||||
tar -ztvf ./path/to/artifact.tgz
|
||||
`,
|
||||
RunE: buildArtifactCmdRun,
|
||||
@@ -47,7 +47,7 @@ var buildArtifactArgs buildArtifactFlags
|
||||
|
||||
func init() {
|
||||
buildArtifactCmd.Flags().StringVar(&buildArtifactArgs.path, "path", "", "Path to the directory where the Kubernetes manifests are located.")
|
||||
buildArtifactCmd.Flags().StringVarP(&buildArtifactArgs.output, "output", "0", "artifact.tgz", "Path to where the artifact tgz file should be written.")
|
||||
buildArtifactCmd.Flags().StringVarP(&buildArtifactArgs.output, "output", "o", "artifact.tgz", "Path to where the artifact tgz file should be written.")
|
||||
buildCmd.AddCommand(buildArtifactCmd)
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ func buildArtifactCmdRun(cmd *cobra.Command, args []string) error {
|
||||
}
|
||||
|
||||
if fs, err := os.Stat(buildArtifactArgs.path); err != nil || !fs.IsDir() {
|
||||
return fmt.Errorf("invalid path %q", buildArtifactArgs.path)
|
||||
return fmt.Errorf("invalid path '%s', must point to an existing directory", buildArtifactArgs.path)
|
||||
}
|
||||
|
||||
logger.Actionf("building artifact from %s", buildArtifactArgs.path)
|
||||
|
||||
Reference in New Issue
Block a user