Skip to content

Commit

Permalink
feat: support .config dir
Browse files Browse the repository at this point in the history
closes #4716

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
  • Loading branch information
caarlos0 committed Mar 27, 2024
1 parent 500be66 commit a00bf7e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/config.go
Expand Up @@ -27,7 +27,9 @@ func loadConfigCheck(path string) (config.Project, string, error) {
p, err := config.Load(path)
return p, path, err
}
for _, f := range [4]string{
for _, f := range [6]string{
".config/goreleaser.yml",
".config/goreleaser.yaml",
".goreleaser.yml",
".goreleaser.yaml",
"goreleaser.yml",
Expand Down
3 changes: 3 additions & 0 deletions cmd/config_test.go
Expand Up @@ -11,13 +11,16 @@ import (

func TestConfigFlagNotSetButExists(t *testing.T) {
for _, name := range []string{
".config/goreleaser.yml",
".config/goreleaser.yaml",
".goreleaser.yml",
".goreleaser.yaml",
"goreleaser.yml",
"goreleaser.yaml",
} {
t.Run(name, func(t *testing.T) {
folder := setup(t)
require.NoError(t, os.MkdirAll(filepath.Dir(name), 0o755))
require.NoError(t, os.Rename(
filepath.Join(folder, "goreleaser.yml"),
filepath.Join(folder, name),
Expand Down

0 comments on commit a00bf7e

Please sign in to comment.