Skip to content

Commit

Permalink
Strip patch version off Go version
Browse files Browse the repository at this point in the history
The input version is two digits (major.minor), but for some buildpacks the version in the go.mod file has three digits. This didn't actually change the go.mod file, but it caused a mismatch if old/new versions, which caused the wrong title to be filed on PRs.

Stripping off the patch version of the go version read out of the go.mod file should enable it to match unless the major.minor is different.

Signed-off-by: Daniel Mikusa <[email protected]>
  • Loading branch information
dmikusa committed Aug 19, 2024
1 parent 115d6d4 commit e5513ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion octo/update-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if [ -z "${GO_VERSION:-}" ]; then
exit 1
fi

OLD_GO_VERSION=$(grep -P '^go \d\.\d+' go.mod | cut -d ' ' -f 2)
OLD_GO_VERSION=$(grep -P '^go \d\.\d+' go.mod | cut -d ' ' -f 2 | cut -d '.' -f 1-2)

go mod edit -go="$GO_VERSION"
go mod tidy
Expand Down

0 comments on commit e5513ea

Please sign in to comment.