1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-30 04:50:45 +02:00

fix for windows

This commit is contained in:
Carlos Alexandro Becker 2017-08-03 22:01:18 -03:00
parent e45c4a9cb7
commit 9811d24e54
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

View File

@ -8,6 +8,7 @@ package context
import (
ctx "context"
"path/filepath"
"strings"
"sync"
@ -50,7 +51,7 @@ var binariesLock sync.Mutex
func (ctx *Context) AddArtifact(file string) {
artifactsLock.Lock()
defer artifactsLock.Unlock()
file = strings.TrimPrefix(file, ctx.Config.Dist+"/")
file = strings.TrimPrefix(file, ctx.Config.Dist+string(filepath.Separator))
ctx.Artifacts = append(ctx.Artifacts, file)
log.WithField("artifact", file).Info("new artifact")
}