mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-22 04:08:49 +02:00
parent
411a73d410
commit
4fa9080885
@ -44,11 +44,18 @@ func allBuildTargets(build config.Build) (targets []target) {
|
|||||||
for _, goarch := range build.Goarch {
|
for _, goarch := range build.Goarch {
|
||||||
if goarch == "arm" {
|
if goarch == "arm" {
|
||||||
for _, goarm := range build.Goarm {
|
for _, goarm := range build.Goarm {
|
||||||
targets = append(targets, target{goos, goarch, goarm})
|
targets = append(targets, target{
|
||||||
|
os: goos,
|
||||||
|
arch: goarch,
|
||||||
|
arm: goarm,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
targets = append(targets, target{goos, goarch, ""})
|
targets = append(targets, target{
|
||||||
|
os: goos,
|
||||||
|
arch: goarch,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
@ -36,7 +36,7 @@ func NewGitHub(ctx *context.Context) (Client, error) {
|
|||||||
client.UploadURL = upload
|
client.UploadURL = upload
|
||||||
}
|
}
|
||||||
|
|
||||||
return &githubClient{client}, nil
|
return &githubClient{client: client}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *githubClient) CreateFile(
|
func (c *githubClient) CreateFile(
|
||||||
|
@ -122,14 +122,17 @@ func validate(ctx *context.Context) error {
|
|||||||
}
|
}
|
||||||
out, err := git.Run("status", "--porcelain")
|
out, err := git.Run("status", "--porcelain")
|
||||||
if strings.TrimSpace(out) != "" || err != nil {
|
if strings.TrimSpace(out) != "" || err != nil {
|
||||||
return ErrDirty{out}
|
return ErrDirty{status: out}
|
||||||
}
|
}
|
||||||
if !regexp.MustCompile("^[0-9.]+").MatchString(ctx.Version) {
|
if !regexp.MustCompile("^[0-9.]+").MatchString(ctx.Version) {
|
||||||
return ErrInvalidVersionFormat{ctx.Version}
|
return ErrInvalidVersionFormat{version: ctx.Version}
|
||||||
}
|
}
|
||||||
_, err = git.Clean(git.Run("describe", "--exact-match", "--tags", "--match", ctx.Git.CurrentTag))
|
_, err = git.Clean(git.Run("describe", "--exact-match", "--tags", "--match", ctx.Git.CurrentTag))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return ErrWrongRef{ctx.Git.Commit, ctx.Git.CurrentTag}
|
return ErrWrongRef{
|
||||||
|
commit: ctx.Git.Commit,
|
||||||
|
tag: ctx.Git.CurrentTag,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -35,5 +35,5 @@ func (e ErrSkip) Error() string {
|
|||||||
|
|
||||||
// Skip skips this pipe with the given reason
|
// Skip skips this pipe with the given reason
|
||||||
func Skip(reason string) ErrSkip {
|
func Skip(reason string) ErrSkip {
|
||||||
return ErrSkip{reason}
|
return ErrSkip{reason: reason}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user