mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-05-29 20:13:02 +00:00
- TagVariants now applies confVariants from releases.conf as case-folded substring matches before package-specific logic, removing the need to hardcode simple variant names in Go - gitea: variants = gogit (excludes Windows gogit builds) - lsd: variants = msvc (moved from Go to conf) - pwsh: variants = fxdependent fxdependentWinDesktop appimage - bun: variants = profile (moved from Go to conf) - sttr: darwin_all tagged as universal2 so arm64 and amd64 Mac users are served; pkg.tar.zst excluded (Arch Linux package format) - add .claude/ to .gitignore
31 lines
1016 B
Go
31 lines
1016 B
Go
// Package pwsh provides variant tagging for PowerShell releases.
|
|
//
|
|
// PowerShell publishes .NET framework-dependent builds (-fxdependent)
|
|
// that are smaller but require a .NET runtime to be installed.
|
|
package pwshdist
|
|
|
|
import (
|
|
"regexp"
|
|
"strings"
|
|
|
|
"github.com/webinstall/webi-installers/internal/storage"
|
|
)
|
|
|
|
// winVersionRe matches Windows-version-specific filenames like
|
|
// "win10-win2016-x64" or "win81-x64" from early PowerShell releases.
|
|
var winVersionRe = regexp.MustCompile(`(?i)-win(?:7|8|81|10|2008|2012|2016)`)
|
|
|
|
// TagVariants tags pwsh-specific build variants.
|
|
//
|
|
// Early releases (pre-6.1) used Windows-version-specific filenames
|
|
// like "win10-win2016-x64" and "win81-win2012r2-x64". These can't
|
|
// be resolved by the legacy cache and are tagged as variants.
|
|
func TagVariants(assets []storage.Asset) {
|
|
for i := range assets {
|
|
lower := strings.ToLower(assets[i].Filename)
|
|
if winVersionRe.MatchString(lower) {
|
|
assets[i].Variants = append(assets[i].Variants, "win-version-specific")
|
|
}
|
|
}
|
|
}
|