Remove unpack suffixes when generating an index bundle

This commit is contained in:
Daniel
2024-10-16 13:51:38 +02:00
parent eb74b6cc1d
commit d6669ff8f5
3 changed files with 16 additions and 4 deletions

View File

@@ -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