1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-17 20:47:50 +02:00

fix: cleaning up

This commit is contained in:
Carlos Alexandro Becker 2017-12-17 22:31:27 -02:00
parent f9dbfb5d70
commit aceb41b0b2
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940
2 changed files with 4 additions and 2 deletions

View File

@ -8,6 +8,8 @@ import (
"github.com/goreleaser/goreleaser/internal/artifact"
)
// Apply applies the name template to the given artifact and name
// TODO: this should be refactored alongside with other name template related todos
func Apply(ctx *context.Context, a artifact.Artifact, name string) (string, error) {
var out bytes.Buffer
t, err := template.New("archive_name").Parse(ctx.Config.Archive.NameTemplate)

View File

@ -99,7 +99,7 @@ func create(ctx *context.Context, arch string, binaries []artifact.Artifact) err
var primeDir = filepath.Join(folderDir, "prime")
var metaDir = filepath.Join(primeDir, "meta")
// #nosec
if err := os.MkdirAll(metaDir, 0755); err != nil {
if err = os.MkdirAll(metaDir, 0755); err != nil {
return err
}
@ -135,7 +135,7 @@ func create(ctx *context.Context, arch string, binaries []artifact.Artifact) err
metadata.Apps[binary.Name] = appMetadata
destBinaryPath := filepath.Join(primeDir, filepath.Base(binary.Path))
if err := os.Link(binary.Path, destBinaryPath); err != nil {
if err = os.Link(binary.Path, destBinaryPath); err != nil {
return err
}
}