mirror of
https://github.com/TECHNOFAB11/powerproto.git
synced 2025-12-12 08:00:04 +01:00
feat(*): support repositories
Signed-off-by: storyicon <yuanchao@bilibili.com>
This commit is contained in:
parent
1c73b92f0f
commit
9a99c53c5b
18 changed files with 542 additions and 255 deletions
|
|
@ -95,6 +95,21 @@ func StepTidyConfigFile(ctx context.Context,
|
|||
item.Protoc = version
|
||||
cleanable = true
|
||||
}
|
||||
for name, pkg := range item.Repositories {
|
||||
path, version, ok := util.SplitGoPackageVersion(pkg)
|
||||
if !ok {
|
||||
return errors.Errorf("invalid package format: %s, should be in path@version format", pkg)
|
||||
}
|
||||
if version == "latest" {
|
||||
progress.SetSuffix("query latest version of %s", path)
|
||||
version, err := pluginManager.GetGitRepoLatestVersion(ctx, path)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
item.Repositories[name] = util.JoinGoPackageVersion(path, version)
|
||||
cleanable = true
|
||||
}
|
||||
}
|
||||
for name, pkg := range item.Plugins {
|
||||
path, version, ok := util.SplitGoPackageVersion(pkg)
|
||||
if !ok {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue