DevOps: fix golang version handling in bash scripts#6288
Merged
onetechnical merged 1 commit intomasterfrom Apr 1, 2025
Merged
Conversation
- Remove go modules version from get_golang_version.sh - Correctly check semantic versioning in check_golang_version.sh
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6288 +/- ##
==========================================
+ Coverage 51.65% 51.67% +0.01%
==========================================
Files 649 649
Lines 86857 86857
==========================================
+ Hits 44868 44880 +12
+ Misses 39128 39112 -16
- Partials 2861 2865 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
algorandskiy
approved these changes
Apr 1, 2025
gmalouf
reviewed
Apr 1, 2025
gmalouf
approved these changes
Apr 1, 2025
onetechnical
added a commit
to onetechnical/go-algorand
that referenced
this pull request
Apr 8, 2025
This was referenced Apr 8, 2025
This was referenced May 15, 2025
cce
pushed a commit
to cce/go-algorand
that referenced
this pull request
May 29, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
If you run
go mod tidywith newer versions of golang, it will automatically change the minimum version field ingo.mod. Before, this would be e.g.1.23, but after update, it will change this to1.23.0.Our bash scripts needed to be updated to take this into account. The following changes were made:
./scripts/get_golang_version.sh all. This was so./scripts/check_golang_version.shcould check for go module support, so I just moved the version information therecheck_golang_version.shto properly compare semantic versionsTest Plan
Set a custom version in check_golang_version.sh and verified:
./scripts/check_golang_version.sh dev./scripts/check_golang_version.sh build