MCPcopy Create free account
hub / github.com/docker/secrets-engine / BumpModule

Function BumpModule

x/release/helper/release.go:117–141  ·  view source on GitHub ↗
(ctx context.Context, mod string, level Level, data ModData, i FS)

Source from the content-addressed store, hash-verified

115}
116
117func BumpModule(ctx context.Context, mod string, level Level, data ModData, i FS) error {
118 release, err := data.GetNextVersion(level)
119 if err != nil {
120 return err
121 }
122
123 tag := mod + "/" + release
124 if err := i.GitTag(ctx, tag); err != nil {
125 return err
126 }
127 needsCommit := false
128 for dep := range data.downstreams {
129 modified, err := i.BumpModInFile(filepath.Join(dep, "go.mod"), mod, release)
130 if err != nil {
131 return err
132 }
133 if modified {
134 needsCommit = true
135 }
136 }
137 if !needsCommit {
138 return nil
139 }
140 return i.GitCommit(ctx, "chore: bump "+tag)
141}
142
143type RepoData map[string]ModData
144

Callers 2

BumpIterativeFunction · 0.85
Test_bumpModuleFunction · 0.85

Calls 4

GetNextVersionMethod · 0.80
GitTagMethod · 0.65
BumpModInFileMethod · 0.65
GitCommitMethod · 0.65

Tested by 1

Test_bumpModuleFunction · 0.68