[WIP] Improve CI build

This commit is contained in:
Vladimir Stoilov
2024-10-07 11:26:27 +03:00
parent 8e1f3c0ed9
commit 71f67a8936
8 changed files with 327 additions and 104 deletions

View File

@@ -10,17 +10,21 @@ import (
)
var binaryMap = map[string]updates.Artifact{
"portmaster-core": {
Platform: "linux_amd64",
"geoipv4.mmdb.gz": {
Filename: "geoipv4.mmdb",
Unpack: "gz",
},
"portmaster-core.exe": {
Platform: "windows_amd64",
},
"portmaster-kext.sys": {
Platform: "windows_amd64",
"geoipv6.mmdb.gz": {
Filename: "geoipv6.mmdb",
Unpack: "gz",
},
}
var ignoreFiles = map[string]struct{}{
"bin-index.json": {},
"intel-index.json": {},
}
func main() {
dir := flag.String("dir", "", "path to the directory that contains the artifacts")
name := flag.String("name", "", "name of the bundle")
@@ -36,7 +40,13 @@ func main() {
return
}
bundle, err := updates.GenerateBundleFromDir(*name, *version, binaryMap, *dir)
settings := updates.BundleFileSettings{
Name: *name,
Version: *version,
Properties: binaryMap,
IgnoreFiles: ignoreFiles,
}
bundle, err := updates.GenerateBundleFromDir(*dir, settings)
if err != nil {
fmt.Fprintf(os.Stderr, "failed to generate bundle: %s\n", err)
return