forked from coop-cloud/abra
parent
2a88491d7c
commit
71a9155042
|
@ -24,6 +24,7 @@ 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"
|
||||
)
|
||||
|
@ -616,9 +617,17 @@ func EnsureUpToDate(recipeName string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
fetchOpts := &git.FetchOptions{Tags: git.AllTags}
|
||||
fmt.Println(branch)
|
||||
fetchOpts := &git.FetchOptions{
|
||||
Tags: git.AllTags,
|
||||
RefSpecs: []gitConfig.RefSpec{
|
||||
gitConfig.RefSpec(fmt.Sprintf("%s:%s", branch, branch)),
|
||||
},
|
||||
}
|
||||
if err := repo.Fetch(fetchOpts); err != nil {
|
||||
return err
|
||||
if !strings.Contains(err.Error(), "already up-to-date") {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
opts := &git.PullOptions{
|
||||
|
|
Loading…
Reference in New Issue