MCPcopy
hub / github.com/spicetify/cli / FetchLatestTagMatchingOrMain

Function FetchLatestTagMatchingOrMain

src/preprocess/preprocess.go:1119–1138  ·  view source on GitHub ↗
(version string)

Source from the content-addressed store, hash-verified

1117}
1118
1119func FetchLatestTagMatchingOrMain(version string) (string, error) {
1120 tag, err := utils.FetchLatestTag()
1121 if err != nil {
1122 return "", err
1123 }
1124 ver, err := splitVersion(tag)
1125 if err != nil {
1126 return "", err
1127 }
1128 versionS, err := splitVersion(version)
1129 if err != nil {
1130 return "", err
1131 }
1132 // major version matches latest, use main branch
1133 if ver[0] == versionS[0] && ver[1] == versionS[1] {
1134 return "main", nil
1135 } else {
1136 return FetchLatestTagMatchingVersion(version)
1137 }
1138}
1139
1140func FetchLatestTagMatchingVersion(version string) (string, error) {
1141 if version == "Dev" {

Callers 1

StartFunction · 0.85

Calls 3

FetchLatestTagFunction · 0.92
splitVersionFunction · 0.85

Tested by

no test coverage detected