diff --git a/interface_cli/actions/about.go b/interface_cli/actions/about.go index a2291bd..4756f74 100644 --- a/interface_cli/actions/about.go +++ b/interface_cli/actions/about.go @@ -9,7 +9,7 @@ import ( func About() string { var sb strings.Builder sb.WriteString("OK ") - sb.WriteString("github.com/darklab8/autogit version: ") + sb.WriteString("autogit version: ") sb.WriteString(settings.GetAutogitVersion()) sb.WriteString("\n") return sb.String() diff --git a/interface_cli/root.go b/interface_cli/root.go index 488c1ab..290e49c 100644 --- a/interface_cli/root.go +++ b/interface_cli/root.go @@ -11,7 +11,7 @@ import ( // rootCmd represents the base command when called without any subcommands var rootCmd = &cobra.Command{ - Use: "github.com/darklab8/autogit", + Use: "autogit", Short: "Git tool for validation of conventional commits, changelog generation and semantic version generation", // Uncomment the following line if your bare application // has an action associated with it: diff --git a/interface_cli/shared.go b/interface_cli/shared.go index 293f315..de3aea3 100644 --- a/interface_cli/shared.go +++ b/interface_cli/shared.go @@ -19,7 +19,7 @@ func (s *sharedFlags) Bind(Cmd *cobra.Command) { func (s *sharedFlags) Run() { if *(s.verboseLogging) { - logus.Log = typelog.NewLogger("github.com/darklab8/autogit", typelog.WithLogLevel(typelog.LEVEL_DEBUG)) + logus.Log = typelog.NewLogger("autogit", typelog.WithLogLevel(typelog.LEVEL_DEBUG)) } logus.Log.Debug(fmt.Sprintf("verbose=%t\n", *(s.verboseLogging))) } diff --git a/semanticgit/git/main.go b/semanticgit/git/main.go index a81e6b4..14ab7fb 100644 --- a/semanticgit/git/main.go +++ b/semanticgit/git/main.go @@ -11,6 +11,7 @@ import ( "github.com/darklab8/autogit/settings/envs" "github.com/darklab8/autogit/settings/logus" "github.com/darklab8/autogit/settings/types" + "github.com/darklab8/go-typelog/typelog" "github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5/config" @@ -182,7 +183,7 @@ func (r *Repository) PushTag(name types.TagName) { sshPath := filepath.Join(string(envs.PathUserHome), ".ssh", string(r.sshPath)) sshKey, _ := os.ReadFile(sshPath) publicKey, keyError := ssh.NewPublicKeys("git", []byte(sshKey), "") - logus.Log.CheckFatal(keyError, "failed initializing git ssh keys") + logus.Log.CheckFatal(keyError, "failed initializing git ssh keys", typelog.String("key_path", string(sshPath))) refs := []config.RefSpec{ config.RefSpec("+refs/tags/" + name + ":refs/tags/" + name), diff --git a/settings/changelog.go b/settings/changelog.go index 0572dca..7c114c6 100644 --- a/settings/changelog.go +++ b/settings/changelog.go @@ -35,12 +35,12 @@ type ChangelogScheme struct { func (conf ConfigScheme) changelogValidate() { if conf.Changelog.CommitURL == "" { - logus.Log.Fatal("github.com/darklab8/autogit.yml->Changelog.CommitUrl is empty") + logus.Log.Fatal("autogit.yml->Changelog.CommitUrl is empty") } if conf.Changelog.CommitRangeURL == "" { - logus.Log.Fatal("github.com/darklab8/autogit.yml->Changelog.CommitRangeURL is empty") + logus.Log.Fatal("autogit.yml->Changelog.CommitRangeURL is empty") } if conf.Changelog.IssueURL == "" { - logus.Log.Fatal("github.com/darklab8/autogit.yml->Changelog.IssueURL is empty") + logus.Log.Fatal("autogit.yml->Changelog.IssueURL is empty") } } diff --git a/settings/logus/logger.go b/settings/logus/logger.go index 57726a5..3264377 100644 --- a/settings/logus/logger.go +++ b/settings/logus/logger.go @@ -3,5 +3,5 @@ package logus import "github.com/darklab8/go-typelog/typelog" var ( - Log *typelog.Logger = typelog.NewLogger("github.com/darklab8/autogit") + Log *typelog.Logger = typelog.NewLogger("autogit") ) diff --git a/settings/settings.go b/settings/settings.go index b32b4e3..b5932c6 100644 --- a/settings/settings.go +++ b/settings/settings.go @@ -22,7 +22,7 @@ import ( "gopkg.in/yaml.v3" ) -const ToolName = "github.com/darklab8/autogit" +const ToolName = "autogit" var HookFolderName = fmt.Sprintf(".%s-hooks", ToolName) @@ -53,7 +53,7 @@ type ConfigScheme struct { // var ProjectConfigPath types.ConfigPath -const ConfigFileName types.ConfigPath = "github.com/darklab8/autogit.yml" +const ConfigFileName types.ConfigPath = "autogit.yml" var cachedConfigFile []byte = []byte{} @@ -167,7 +167,7 @@ func configRead(file []byte) *ConfigScheme { err = yaml.Unmarshal(merged_config_as_bytes, &config) logus.Log.CheckError(err, `unable to unmarshal merged config. Your autogit.yml settings file is having invalue key: value pairs. - Try to remove previous autogit.yml settings files and generate a new one with "github.com/darklab8/autogit init [--global] command"`) + Try to remove previous autogit.yml settings files and generate a new one with "autogit init [--global] command"`) return &config } @@ -197,9 +197,9 @@ func check_file_is_not_having_invalid[T comparable](example map[T]interface{}, c // if key is present in additions hasmap if example_value, is_present := example[checkable_key]; !is_present { - logus.Log.Error(fmt.Sprintf(`autogit.yml file is having not allowed user settings key + logus.Log.Error(`autogit.yml file is having not allowed user settings key Please, remove previous autogit.yml local in your repository and user global one and generate new one - with "github.com/darklab8/autogit init [--global]" command :). Or remove the specified "settings_key"`), logus.SettingsKey(checkable_key)) + with "autogit init [--global]" command :). Or remove the specified "settings_key"`, logus.SettingsKey(checkable_key)) } else { if reflect.TypeOf(example_value) != reflect.TypeOf(checkable_value) { logus.Log.Fatal(fmt.Sprintf( diff --git a/settings/testutils/fixtures.go b/settings/testutils/fixtures.go index 894db1d..c077e61 100644 --- a/settings/testutils/fixtures.go +++ b/settings/testutils/fixtures.go @@ -13,7 +13,7 @@ func FixtureSettings() { workdir := utils.GetCurrentFolder() originalSettingsPath := workdir rootFolder := filepath.Dir(string(originalSettingsPath)) - testSettingsPath := types.ConfigPath(filepath.Join(rootFolder, "settings", "github.com/darklab8/autogit.example.yml")) + testSettingsPath := types.ConfigPath(filepath.Join(rootFolder, "settings", "autogit.example.yml")) settings.NewConfig(testSettingsPath) }