Merge pull request from safing/fix/generated-index-version

Use the current binary version for the generated index
This commit is contained in:
Alexandr Stelnykovych 2025-03-25 17:02:53 +02:00 committed by GitHub
commit b320ac24fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -14,6 +14,7 @@ import (
"github.com/tevino/abool"
"github.com/safing/jess"
"github.com/safing/portmaster/base/info"
"github.com/safing/portmaster/base/log"
"github.com/safing/portmaster/base/notifications"
"github.com/safing/portmaster/service/mgr"
@ -192,7 +193,9 @@ func New(instance instance, name string, cfg Config) (*Updater, error) {
log.Errorf("updates/%s: invalid index file, falling back to dir scan: %s", cfg.Name, err)
module.corruptedInstallation = fmt.Errorf("invalid index: %w", err)
}
index, err = GenerateIndexFromDir(cfg.Directory, IndexScanConfig{Version: "0.0.0"})
index, err = GenerateIndexFromDir(cfg.Directory, IndexScanConfig{
Version: info.VersionNumber(),
})
if err == nil && index.init(currentPlatform) == nil {
module.index = index
return module, nil