Add special release channel
This commit is contained in:
@@ -49,9 +49,14 @@ func registerConfig() error {
|
||||
Description: "Production releases for testing new features that may break and cause interruption.",
|
||||
Value: helper.ReleaseChannelBeta,
|
||||
},
|
||||
{
|
||||
Name: "Special",
|
||||
Description: "Special releases or version changes for troubleshooting. Only use temporarily and when instructed.",
|
||||
Value: helper.ReleaseChannelSpecial,
|
||||
},
|
||||
{
|
||||
Name: "Staging",
|
||||
Description: "Development releases for testing random things and experimenting. Dangerous - only use when told so.",
|
||||
Description: "Dangerous development releases for testing random things and experimenting. Only use temporarily and when instructed.",
|
||||
Value: helper.ReleaseChannelStaging,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -10,6 +10,7 @@ const (
|
||||
ReleaseChannelStable = "stable"
|
||||
ReleaseChannelBeta = "beta"
|
||||
ReleaseChannelStaging = "staging"
|
||||
ReleaseChannelSpecial = "special"
|
||||
)
|
||||
|
||||
func SetIndexes(registry *updater.ResourceRegistry, releaseChannel string) {
|
||||
@@ -21,14 +22,14 @@ func SetIndexes(registry *updater.ResourceRegistry, releaseChannel string) {
|
||||
|
||||
// Always add the stable index as a base.
|
||||
registry.AddIndex(updater.Index{
|
||||
Path: "stable.json",
|
||||
Path: ReleaseChannelStable + ".json",
|
||||
})
|
||||
|
||||
// Add beta index if in beta or staging channel.
|
||||
if releaseChannel == ReleaseChannelBeta ||
|
||||
releaseChannel == ReleaseChannelStaging {
|
||||
registry.AddIndex(updater.Index{
|
||||
Path: "beta.json",
|
||||
Path: ReleaseChannelBeta + ".json",
|
||||
PreRelease: true,
|
||||
})
|
||||
}
|
||||
@@ -36,11 +37,18 @@ func SetIndexes(registry *updater.ResourceRegistry, releaseChannel string) {
|
||||
// Add staging index if in staging channel.
|
||||
if releaseChannel == ReleaseChannelStaging {
|
||||
registry.AddIndex(updater.Index{
|
||||
Path: "staging.json",
|
||||
Path: ReleaseChannelStaging + ".json",
|
||||
PreRelease: true,
|
||||
})
|
||||
}
|
||||
|
||||
// Add special index if in special channel.
|
||||
if releaseChannel == ReleaseChannelSpecial {
|
||||
registry.AddIndex(updater.Index{
|
||||
Path: ReleaseChannelSpecial + ".json",
|
||||
})
|
||||
}
|
||||
|
||||
// Add the intel index last, as it updates the fastest and should not be
|
||||
// crippled by other faulty indexes. It can only specify versions for its
|
||||
// scope anyway.
|
||||
|
||||
Reference in New Issue
Block a user