From e9a8efb41465e48306f077b2ba1ee087260f2b90 Mon Sep 17 00:00:00 2001 From: Andrii Klymiuk Date: Sat, 31 Aug 2024 20:24:26 +0300 Subject: [PATCH] Fixed automatic message in env --- cmd/root.go | 2 +- cmd/script.go | 4 +--- utils/generateEnv.go | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index 4dd3fda..d1be8ab 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -6,7 +6,7 @@ import ( "github.com/spf13/cobra" ) -var APP_VERSION = "1.7.0" +var APP_VERSION = "1.7.1" // rootCmd represents the base command when called without any subcommands var rootCmd = &cobra.Command{ diff --git a/cmd/script.go b/cmd/script.go index 6d77ef2..ef3d387 100644 --- a/cmd/script.go +++ b/cmd/script.go @@ -16,7 +16,7 @@ var scriptCmd = &cobra.Command{ Use: "script", Short: "Runs script on each service, if it specified", Run: runScript, - Aliases: []string{"asdf", "scripts", "commands"}, + Aliases: []string{"asdf", "asd", "scripts", "commands"}, } var ScriptNamesFromFlag []string @@ -88,7 +88,6 @@ func runScript(cmd *cobra.Command, _ []string) { utils.GenerateEnvForService( corgi, service, - "# 🐶 Generate env file for script", scriptServiceCmd.CopyEnvFromFilePath, ) } @@ -99,7 +98,6 @@ func runScript(cmd *cobra.Command, _ []string) { utils.GenerateEnvForService( corgi, service, - "# 🐶 Generate env file for script", "", ) } diff --git a/utils/generateEnv.go b/utils/generateEnv.go index 5a2f926..d894c76 100644 --- a/utils/generateEnv.go +++ b/utils/generateEnv.go @@ -139,7 +139,6 @@ func GenerateEnvForServices(corgiCompose *CorgiCompose) { GenerateEnvForService( corgiCompose, service, - "# 🐶 Auto generated vars by corgi", "", ) } @@ -148,9 +147,9 @@ func GenerateEnvForServices(corgiCompose *CorgiCompose) { func GenerateEnvForService( corgiCompose *CorgiCompose, service Service, - corgiGeneratedMessage string, copyEnvFilePath string, ) error { + corgiGeneratedMessage := "# 🐶 Auto generated vars by corgi" err := EnsurePathExists(service.AbsolutePath) if err != nil { fmt.Println("Error ensuring directory:", err)