mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-08 03:31:59 +02:00
renamed fields
This commit is contained in:
parent
7d01a5a8a4
commit
d2d215feaa
@ -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")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user