Skip to content

Commit

Permalink
Cleanup output
Browse files Browse the repository at this point in the history
  • Loading branch information
quinna-h committed Nov 20, 2024
1 parent df21b8e commit a7f4d34
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions latest_major_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@ func main() {
// Iterate over the required modules
for _, req := range modFile.Require {
module := req.Mod.Path
fmt.Printf("Parsed module: %s\n", module)
version := req.Mod.Version
fmt.Printf("Parsed version: %s\n", version)
// version := req.Mod.Version

if match := versionRegex.FindStringSubmatch(module); match != nil {
url := match[1] // base module URL (e.g., github.com/foo)
Expand All @@ -98,7 +96,8 @@ func main() {
}
}

// Check if a new major version in Github is available that we don't support. If so, output that a new latest is available.
// 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 {
latestVersion, err := getLatestMajorVersion(module)
if err != nil {
Expand All @@ -108,7 +107,7 @@ func main() {

normalizedMajor := strings.TrimSpace(strings.TrimPrefix(major, "v"))
normalizedLatestMajor := strings.TrimSpace(strings.TrimPrefix(latestVersion, "v"))
fmt.Printf("Latest DD version of %s: v%s\n", module, normalizedMajor)
fmt.Printf("Latest DD major version of %s: v%s\n", module, normalizedMajor)

if normalizedMajor != normalizedLatestMajor {
fmt.Printf("New latest major version of %s available: v%s\n", module, normalizedLatestMajor)
Expand Down

0 comments on commit a7f4d34

Please sign in to comment.