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

See coop-cloud/organising#477
This commit is contained in:
decentral1se 2023-08-13 14:06:02 +02:00
parent 5ae73f700e
commit eb0af6d1f1
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
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)