-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: added client logic for manifest cli
* added client logic for manifest cli * added manifest push Signed-off-by: WYGIN <[email protected]> --------- Signed-off-by: WYGIN <[email protected]>
- Loading branch information
1 parent
87f67fd
commit e7cd44b
Showing
26 changed files
with
685 additions
and
87 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package commands | ||
|
||
import ( | ||
"github.com/spf13/cobra" | ||
|
||
"github.com/buildpacks/pack/pkg/logging" | ||
) | ||
|
||
// ManifestDeleteFlags define flags provided to the ManifestDelete | ||
// type ManifestDeleteFlags struct { | ||
// } | ||
|
||
// ManifestExists checks if a manifest list exists in local storage | ||
func ManifestExists(logger logging.Logger, pack PackClient) *cobra.Command { | ||
// var flags ManifestDeleteFlags | ||
|
||
cmd := &cobra.Command{ | ||
Use: "pack manifest exists [manifest-list]", | ||
Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs), | ||
Short: "Delete one or more manifest lists from local storage", | ||
Example: `pack manifest exists cnbs/sample-package:hello-multiarch-universe`, | ||
Long: `Checks if a manifest list exists in local storage`, | ||
RunE: logError(logger, func(cmd *cobra.Command, args []string) error { | ||
if err := pack.ExistsManifest(cmd.Context(), args[0]); err != nil { | ||
return err | ||
} | ||
return nil | ||
}), | ||
} | ||
|
||
AddHelpFlag(cmd, "remove") | ||
return cmd | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package commands_test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
internal/commands/testmocks/mock_inspect_image_writer_factory.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.