mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 16:42:26 +08:00
feat(cli): add command for upgrading one plugin
This commit is contained in:
@ -71,15 +71,14 @@ func InstallPlugin(pluginName, pluginFolder, version string) error {
|
||||
|
||||
err = downloadFile(plugin.Id, pluginFolder, downloadURL)
|
||||
if err == nil {
|
||||
log.Info("Installed %s successfully ✔\n", plugin.Id)
|
||||
log.Infof("Installed %v successfully ✔\n", plugin.Id)
|
||||
}
|
||||
|
||||
res := s.ReadPlugin(pluginFolder, pluginName)
|
||||
res, _ := s.ReadPlugin(pluginFolder, pluginName)
|
||||
|
||||
for _, v := range res.Dependency.Plugins {
|
||||
log.Infof("Installing Dependency: %s\n", v.Id)
|
||||
|
||||
InstallPlugin(v.Id, pluginFolder, "")
|
||||
log.Infof("Installed Dependency: %v ✔\n", v.Id)
|
||||
}
|
||||
|
||||
return err
|
||||
|
Reference in New Issue
Block a user