mirror of
https://github.com/safing/portmaster
synced 2025-04-21 19:39:09 +00:00
Remove unpack suffixes when generating an index bundle
This commit is contained in:
parent
eb74b6cc1d
commit
d6669ff8f5
3 changed files with 16 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue