mirror of
https://github.com/ko-build/ko.git
synced 2026-06-18 20:14:08 +02:00
Pre-parse platform string with StringSliceVar (#551)
* Pre-parse platform string with StringSliceVar This allows users to declare --platform multiple times and have the values appended, i.e.: ko build --platform=linux/amd64 --platform=linux/arm64 is equivalent to ko build --platform=linux/amd64,linux/arm64 As a side effect, platformMatcher.spec and gobuildOpener.platforms are now of type []string (instead of string) to maintain structure of information from flag parsing. * Adjust comments and styling for clarity. * The flag --platform is now of type strings. Internally cobra/pflag defines StringSliceVar as "strings" whereas StringVar is defined as "string". This change is updated by running hack/update-codegen.sh script. * Add backwards compatibility for WithPlatforms function signature Update comments to reflect implementation as well. * Fix syntax failure on unit test
This commit is contained in:
+1
-1
@@ -53,7 +53,7 @@ ko build IMPORTPATH... [flags]
|
||||
-j, --jobs int The maximum number of concurrent builds (default GOMAXPROCS)
|
||||
-L, --local Load into images to local docker daemon.
|
||||
--oci-layout-path string Path to save the OCI image layout of the built images
|
||||
--platform string Which platform to use when pulling a multi-platform base. Format: all | <os>[/<arch>[/<variant>]][,platform]*
|
||||
--platform strings Which platform to use when pulling a multi-platform base. Format: all | <os>[/<arch>[/<variant>]][,platform]*
|
||||
-P, --preserve-import-paths Whether to preserve the full import path after KO_DOCKER_REPO.
|
||||
--push Push images to KO_DOCKER_REPO (default true)
|
||||
--sbom string The SBOM media type to use (none will disable SBOM synthesis and upload, also supports: spdx, go.version-m). (default "spdx")
|
||||
|
||||
Reference in New Issue
Block a user