mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-03-17 20:47:50 +02:00
more cleanups and renames
This commit is contained in:
parent
0498ec3393
commit
0d80c3cc15
@ -1,10 +0,0 @@
|
||||
package client
|
||||
|
||||
// TODO fix this
|
||||
// func TestDescription(t *testing.T) {
|
||||
// assert := assert.New(t)
|
||||
// desc := describeRelease("0abf342 some message")
|
||||
// assert.Contains(desc, "0abf342 some message")
|
||||
// assert.Contains(desc, "Automated with @goreleaser")
|
||||
// assert.Contains(desc, "go version go1.")
|
||||
// }
|
@ -15,7 +15,7 @@ Automated with @goreleaser
|
||||
Built with {{ .GoVersion }}
|
||||
`
|
||||
|
||||
func buildBody(ctx *context.Context) (bytes.Buffer, error) {
|
||||
func describeBody(ctx *context.Context) (bytes.Buffer, error) {
|
||||
var out bytes.Buffer
|
||||
bts, err := exec.Command("go", "version").CombinedOutput()
|
||||
if err != nil {
|
||||
|
@ -8,13 +8,13 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestBody(t *testing.T) {
|
||||
func TestDescribeBody(t *testing.T) {
|
||||
var assert = assert.New(t)
|
||||
var changelog = "\nfeature1: description\nfeature2: other description"
|
||||
var ctx = &context.Context{
|
||||
ReleaseNotes: changelog,
|
||||
}
|
||||
out, err := buildBody(ctx)
|
||||
out, err := describeBody(ctx)
|
||||
assert.NoError(err)
|
||||
assert.Contains(out.String(), changelog)
|
||||
assert.Contains(out.String(), "Automated with @goreleaser")
|
||||
@ -31,6 +31,6 @@ func TestGoVersionFails(t *testing.T) {
|
||||
var ctx = &context.Context{
|
||||
ReleaseNotes: "changelog",
|
||||
}
|
||||
_, err := buildBody(ctx)
|
||||
_, err := describeBody(ctx)
|
||||
assert.Error(err)
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ func doRun(ctx *context.Context, client client.Client) error {
|
||||
return nil
|
||||
}
|
||||
log.Println("Creating or updating release", ctx.Git.CurrentTag, "on", ctx.Config.Release.GitHub.String())
|
||||
body, err := buildBody(ctx)
|
||||
body, err := describeBody(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user