fix: don't specify refs when pulling tags
continuous-integration/drone/push Build is failing Details

See coop-cloud/organising#477
This commit is contained in:
decentral1se 2023-08-13 14:06:02 +02:00 committed by decentral1se
parent e42139fd83
commit 60c0e55e3d
1 changed files with 1 additions and 7 deletions

View File

@ -25,7 +25,6 @@ import (
composetypes "github.com/docker/cli/cli/compose/types"
"github.com/docker/distribution/reference"
"github.com/go-git/go-git/v5"
gitConfig "github.com/go-git/go-git/v5/config"
"github.com/go-git/go-git/v5/plumbing"
"github.com/sirupsen/logrus"
)
@ -647,12 +646,7 @@ func EnsureUpToDate(recipeName string, conf *runtime.Config) error {
return fmt.Errorf("unable to check out default branch in %s: %s", recipeDir, err)
}
fetchOpts := &git.FetchOptions{
Tags: git.AllTags,
RefSpecs: []gitConfig.RefSpec{
gitConfig.RefSpec(fmt.Sprintf("%s:%s", branch, branch)),
},
}
fetchOpts := &git.FetchOptions{Tags: git.AllTags}
if err := repo.Fetch(fetchOpts); err != nil {
if !strings.Contains(err.Error(), "already up-to-date") {
return fmt.Errorf("unable to fetch tags in %s: %s", recipeDir, err)