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

fix: artifacts.json should be 0644 instead of 0600 (#2801)

This commit is contained in:
Carlos Alexandro Becker 2021-12-31 15:05:28 -03:00 committed by GitHub
parent e2c31278c9
commit bbd79a11a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -24,5 +24,5 @@ func (Pipe) Run(ctx *context.Context) error {
}
path := filepath.Join(ctx.Config.Dist, "artifacts.json")
log.Log.WithField("file", path).Info("writing")
return os.WriteFile(path, bts, 0o600)
return os.WriteFile(path, bts, 0o644)
}

View File

@ -1,6 +1,7 @@
package artifacts
import (
"os"
"path/filepath"
"testing"
@ -30,5 +31,10 @@ func TestArtifacts(t *testing.T) {
})
require.NoError(t, Pipe{}.Run(ctx))
golden.RequireEqualJSON(t, golden.RequireReadFile(t, filepath.Join(tmp, "artifacts.json")))
path := filepath.Join(tmp, "artifacts.json")
golden.RequireEqualJSON(t, golden.RequireReadFile(t, path))
info, err := os.Stat(path)
require.NoError(t, err)
require.Equal(t, "-rw-r--r--", info.Mode().String())
}