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:
parent
f9dbfb5d70
commit
aceb41b0b2
@ -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)
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user