Skip to content

Commit

Permalink
Change output to sorted
Browse files Browse the repository at this point in the history
  • Loading branch information
quinna-h committed Dec 2, 2024
1 parent eb0ea8c commit a53aa61
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/apps/latest_major_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ package main
import (
"encoding/json"
"fmt"
"sort"
"github.com/Masterminds/semver/v3"
"golang.org/x/mod/modfile"
"net/http"
Expand Down Expand Up @@ -120,7 +121,16 @@ func main() {
// Output latest major version that we support.
// Check if a new major version in Github is available that we don't support.
// If so, output that a new latest is available.
for module, major := range latestMajor {

// Sort the output
modules := make([]string, 0, len(latestMajor))
for module := range latestMajor {
modules = append(modules, module)
}
sort.Strings(modules)

for _, module := range modules {
major := latestMajor[module]

latestVersion, err := getLatestMajorVersion(module) // latest version available
if err != nil {
Expand Down

0 comments on commit a53aa61

Please sign in to comment.