Make sure to not create checksums of directories

This commit is contained in:
kolaente 2020-09-02 21:54:25 +02:00
parent 61240084e8
commit d85bf0681f
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 6 additions and 2 deletions

View File

@ -487,8 +487,8 @@ func (Release) Compress(ctx context.Context) error {
}
// Copies all built binaries to dist/release/ in preparation for creating the os packages
func (Release) Copy() {
filepath.Walk(RootPath+"/"+DIST+"/binaries/", func(path string, info os.FileInfo, err error) error {
func (Release) Copy() error {
return filepath.Walk(RootPath+"/"+DIST+"/binaries/", func(path string, info os.FileInfo, err error) error {
// Only executable files
if !strings.Contains(info.Name(), Executable) {
return nil
@ -502,6 +502,10 @@ func (Release) Copy() {
func (Release) Check() error {
p := RootPath + "/" + DIST + "/release/"
return filepath.Walk(p, func(path string, info os.FileInfo, err error) error {
if info.IsDir() {
return nil
}
f, err := os.Create(p + info.Name() + ".sha256")
if err != nil {
return err