mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-10 03:47:03 +02:00
renamed fields
This commit is contained in:
parent
7d01a5a8a4
commit
d2d215feaa
@ -36,13 +36,13 @@ type Context struct {
|
|||||||
Snapshot bool
|
Snapshot bool
|
||||||
}
|
}
|
||||||
|
|
||||||
var artifactLock sync.Mutex
|
var artifactsLock sync.Mutex
|
||||||
var archiveLock sync.Mutex
|
var binariesLock sync.Mutex
|
||||||
|
|
||||||
// AddArtifact adds a file to upload list
|
// AddArtifact adds a file to upload list
|
||||||
func (ctx *Context) AddArtifact(file string) {
|
func (ctx *Context) AddArtifact(file string) {
|
||||||
artifactLock.Lock()
|
artifactsLock.Lock()
|
||||||
defer artifactLock.Unlock()
|
defer artifactsLock.Unlock()
|
||||||
file = strings.TrimPrefix(file, ctx.Config.Dist)
|
file = strings.TrimPrefix(file, ctx.Config.Dist)
|
||||||
file = strings.Replace(file, "/", "", -1)
|
file = strings.Replace(file, "/", "", -1)
|
||||||
ctx.Artifacts = append(ctx.Artifacts, file)
|
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
|
// AddBinary adds a built binary to the current context
|
||||||
func (ctx *Context) AddBinary(key, file string) {
|
func (ctx *Context) AddBinary(key, file string) {
|
||||||
archiveLock.Lock()
|
binariesLock.Lock()
|
||||||
defer archiveLock.Unlock()
|
defer binariesLock.Unlock()
|
||||||
ctx.Binaries[key] = file
|
ctx.Binaries[key] = file
|
||||||
log.WithField("key", key).WithField("binary", file).Info("added")
|
log.WithField("key", key).WithField("binary", file).Info("added")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user