1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-02-03 13:11:48 +02:00

feat: support .config dir

closes #4716

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
Carlos Alexandro Becker 2024-03-26 23:37:08 -03:00
parent 500be667af
commit a00bf7e5d6
No known key found for this signature in database
2 changed files with 6 additions and 1 deletions

View File

@ -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",

View File

@ -11,6 +11,8 @@ import (
func TestConfigFlagNotSetButExists(t *testing.T) {
for _, name := range []string{
".config/goreleaser.yml",
".config/goreleaser.yaml",
".goreleaser.yml",
".goreleaser.yaml",
"goreleaser.yml",
@ -18,6 +20,7 @@ func TestConfigFlagNotSetButExists(t *testing.T) {
} {
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),