1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-08 03:31:59 +02:00

renamed fields

This commit is contained in:
Carlos Alexandro Becker 2017-07-01 12:31:12 -03:00
parent 7d01a5a8a4
commit d2d215feaa
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

View File

@ -36,13 +36,13 @@ type Context struct {
Snapshot bool
}
var artifactLock sync.Mutex
var archiveLock sync.Mutex
var artifactsLock sync.Mutex
var binariesLock sync.Mutex
// AddArtifact adds a file to upload list
func (ctx *Context) AddArtifact(file string) {
artifactLock.Lock()
defer artifactLock.Unlock()
artifactsLock.Lock()
defer artifactsLock.Unlock()
file = strings.TrimPrefix(file, ctx.Config.Dist)
file = strings.Replace(file, "/", "", -1)
ctx.Artifacts = append(ctx.Artifacts, file)
@ -51,8 +51,8 @@ func (ctx *Context) AddArtifact(file string) {
// AddBinary adds a built binary to the current context
func (ctx *Context) AddBinary(key, file string) {
archiveLock.Lock()
defer archiveLock.Unlock()
binariesLock.Lock()
defer binariesLock.Unlock()
ctx.Binaries[key] = file
log.WithField("key", key).WithField("binary", file).Info("added")
}