1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-04 03:11:55 +02:00

test: use main as git branch for tests (#2083)

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
This commit is contained in:
Carlos Alexandro Becker 2021-03-01 14:18:26 -03:00 committed by GitHub
parent 23a0f75fc1
commit 5d7f36eadb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,7 +10,7 @@ import (
// GitInit inits a new git project.
func GitInit(t testing.TB) {
out, err := fakeGit("init")
out, err := fakeGit("init", "-b", "main")
require.NoError(t, err)
require.Contains(t, out, "Initialized empty Git repository")
require.NoError(t, err)
@ -38,7 +38,7 @@ func GitCommitWithDate(t testing.TB, msg string, commitDate time.Time) {
}
out, err := fakeGitEnv(env, "commit", "--allow-empty", "-m", msg)
require.NoError(t, err)
require.Contains(t, out, "master", msg)
require.Contains(t, out, "main", msg)
}
// GitTag creates a git tag.