From b4a3c0867b4772a7140ba4254eb7ce300eadcc2f Mon Sep 17 00:00:00 2001 From: 7h3-3mp7y-m4n Date: Sun, 20 Oct 2024 01:48:01 +0530 Subject: [PATCH 1/2] Added oci:// example with layout Signed-off-by: 7h3-3mp7y-m4n --- internal/command/init.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/command/init.go b/internal/command/init.go index ea30246..7e8f7da 100644 --- a/internal/command/init.go +++ b/internal/command/init.go @@ -225,8 +225,12 @@ func init() { initCmd.Flags().StringP(initCmdFileFlag, "f", scoreFileDefault, "The score file to initialize") initCmd.Flags().StringP(initCmdFileProjectFlag, "p", "", "Set the name of the docker compose project (defaults to the current directory name)") initCmd.Flags().Bool(initCmdFileNoSampleFlag, false, "Disable generation of the sample score file") - initCmd.Flags().StringArray(initCmdProvisionerFlag, nil, "A provisioners file to install. May be specified multiple times. Supports http://host/file, https://host/file, git-ssh://git@host/repo.git/file, and git-https://host/repo.git/file formats.") - + initCmd.Flags().StringArray(initCmdProvisionerFlag, nil, "Provisioner files to install. May be specified multiple times. Supports:\n"+ + "- HTTP: http://host/file\n"+ + "- HTTPS: https://host/file\n"+ + "- Git (SSH): git-ssh://git@host/repo.git/file\n"+ + "- Git (HTTPS): git-https://host/repo.git/file\n"+ + "- OCI: oci://[registry/][namespace/]repository[:tag|@digest]") rootCmd.AddCommand(initCmd) } From 02f7f730f8556273cda1c712612f81b92974ffe9 Mon Sep 17 00:00:00 2001 From: 7h3-3mp7y-m4n Date: Sun, 20 Oct 2024 02:23:48 +0530 Subject: [PATCH 2/2] Added new layout and passing test Signed-off-by: 7h3-3mp7y-m4n --- internal/command/init.go | 11 ++++++----- internal/command/init_test.go | 7 ++++++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/internal/command/init.go b/internal/command/init.go index 7e8f7da..7862e0c 100644 --- a/internal/command/init.go +++ b/internal/command/init.go @@ -226,11 +226,12 @@ func init() { initCmd.Flags().StringP(initCmdFileProjectFlag, "p", "", "Set the name of the docker compose project (defaults to the current directory name)") initCmd.Flags().Bool(initCmdFileNoSampleFlag, false, "Disable generation of the sample score file") initCmd.Flags().StringArray(initCmdProvisionerFlag, nil, "Provisioner files to install. May be specified multiple times. Supports:\n"+ - "- HTTP: http://host/file\n"+ - "- HTTPS: https://host/file\n"+ - "- Git (SSH): git-ssh://git@host/repo.git/file\n"+ - "- Git (HTTPS): git-https://host/repo.git/file\n"+ - "- OCI: oci://[registry/][namespace/]repository[:tag|@digest]") + "- HTTP : http://host/file\n"+ + "- HTTPS : https://host/file\n"+ + "- Git (SSH) : git-ssh://git@host/repo.git/file\n"+ + "- Git (HTTPS) : git-https://host/repo.git/file\n"+ + "- OCI : oci://[registry/][namespace/]repository[:tag|@digest]") + rootCmd.AddCommand(initCmd) } diff --git a/internal/command/init_test.go b/internal/command/init_test.go index 77ef160..c5fee69 100644 --- a/internal/command/init_test.go +++ b/internal/command/init_test.go @@ -67,7 +67,12 @@ Flags: -h, --help help for init --no-sample Disable generation of the sample score file -p, --project string Set the name of the docker compose project (defaults to the current directory name) - --provisioners stringArray A provisioners file to install. May be specified multiple times. Supports http://host/file, https://host/file, git-ssh://git@host/repo.git/file, and git-https://host/repo.git/file formats. + --provisioners stringArray Provisioner files to install. May be specified multiple times. Supports: + - HTTP : http://host/file + - HTTPS : https://host/file + - Git (SSH) : git-ssh://git@host/repo.git/file + - Git (HTTPS) : git-https://host/repo.git/file + - OCI : oci://[registry/][namespace/]repository[:tag|@digest] Global Flags: --quiet Mute any logging output