Log advice when a newer Go version is required under Actions

This commit is contained in:
Chris Smowton
2024-01-23 10:49:52 +00:00
parent cda2ef4db5
commit 7e96eaa273

View File

@@ -800,6 +800,9 @@ func installDependenciesAndBuild() {
// Go tooling should install required Go versions as needed.
if semver.Compare(getEnvGoSemVer(), "v1.21.0") < 0 && goVersionInfo.Found && semver.Compare("v"+goVersionInfo.Version, getEnvGoSemVer()) > 0 {
diagnostics.EmitNewerGoVersionNeeded()
if val, _ := os.LookupEnv("GITHUB_ACTIONS"); val == "true" {
log.Printf("The go.mod version is newer than the installed version of Go. Consider adding an actions/setup-go step to your workflow.\n")
}
}
fixGoVendorIssues(&buildInfo, goVersionInfo.Found)