Remove unpack suffixes when generating an index bundle
This commit is contained in:
@@ -177,7 +177,7 @@ go-build:
|
||||
ARG GOOS=linux
|
||||
ARG GOARCH=amd64
|
||||
ARG GOARM
|
||||
ARG CMDS=portmaster-start portmaster-core
|
||||
ARG CMDS=portmaster-core
|
||||
|
||||
CACHE --sharing shared "$GOCACHE"
|
||||
CACHE --sharing shared "$GOMODCACHE"
|
||||
|
||||
@@ -31,15 +31,22 @@ var (
|
||||
"**/hubs*.json",
|
||||
"**/*mini*.mmdb.gz",
|
||||
|
||||
// Unsupported platforms.
|
||||
"darwin_amd64/**",
|
||||
"darwin_arm64/**",
|
||||
|
||||
// Deprecated artifacts.
|
||||
"**/portmaster-start*",
|
||||
"**/portmaster-app*",
|
||||
"**/portmaster-notifier*",
|
||||
"**/portmaster-wintoast*.dll",
|
||||
"**/portmaster-snoretoast*.exe",
|
||||
"**/portmaster-kext*.dll",
|
||||
"**/profilemgr*.zip",
|
||||
"**/settings*.zip",
|
||||
"**/monitor*.zip",
|
||||
"**/base*.zip",
|
||||
"**/console*.zip",
|
||||
"**/portmaster-wintoast*.dll",
|
||||
"**/portmaster-snoretoast*.exe",
|
||||
"**/portmaster-kext*.dll",
|
||||
},
|
||||
UnpackFiles: map[string]string{
|
||||
"gz": "**/*.gz",
|
||||
|
||||
@@ -209,6 +209,11 @@ func GenerateBundleFromDir(bundleDir string, settings BundleFileSettings) (*Bund
|
||||
artifact.Version = version
|
||||
}
|
||||
|
||||
// Remove unpack suffix.
|
||||
if artifact.Unpack != "" {
|
||||
artifact.Filename, _ = strings.CutSuffix(artifact.Filename, "."+artifact.Unpack)
|
||||
}
|
||||
|
||||
// Set local file path.
|
||||
artifact.localFile = fullpath
|
||||
|
||||
|
||||
Reference in New Issue
Block a user