Split versions.json into 2 files, one in the plugins dir, one in the database dir. Closes #576

This commit is contained in:
tyagiparth
2021-07-13 17:38:16 +05:30
committed by GitHub
parent c2b1af79af
commit 3fbf2b542e
16 changed files with 394 additions and 459 deletions

View File

@@ -43,7 +43,7 @@ func Remove(image string, pluginConnections map[string][]string) error {
}
// update the version file
v, err := versionfile.Load()
v, err := versionfile.LoadPluginVersionFile()
if err != nil {
return err
}
@@ -53,7 +53,7 @@ func Remove(image string, pluginConnections map[string][]string) error {
// Exists looks up the version file and reports whether a plugin is already installed
func Exists(plugin string) (bool, error) {
versionData, err := versionfile.Load()
versionData, err := versionfile.LoadPluginVersionFile()
if err != nil {
return false, err
}
@@ -95,7 +95,7 @@ func List(pluginConnectionMap map[string][]string) ([]PluginListItem, error) {
return nil
})
v, err := versionfile.Load()
v, err := versionfile.LoadPluginVersionFile()
if err != nil {
return nil, err
}

View File

@@ -60,7 +60,7 @@ func GetAllUpdateReport(installationID string) map[string]VersionCheckReport {
versionChecker.signature = installationID
versionChecker.pluginsToCheck = []*versionfile.InstalledVersion{}
versionFileData, err := versionfile.Load()
versionFileData, err := versionfile.LoadPluginVersionFile()
if err != nil {
log.Println("[TRACE]", "CheckAndReportPluginUpdates", "could not load versionfile")
return nil
@@ -76,7 +76,7 @@ func GetAllUpdateReport(installationID string) map[string]VersionCheckReport {
}
func (v *VersionChecker) reportPluginUpdates() map[string]VersionCheckReport {
versionFileData, err := versionfile.Load()
versionFileData, err := versionfile.LoadPluginVersionFile()
if err != nil {
log.Println("[TRACE]", "CheckAndReportPluginUpdates", "could not load versionfile")
return nil