Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

update golang to in-support versions (1.16 and 1.17) #1001

Merged
merged 3 commits into from
Aug 19, 2021
Merged

Conversation

joshspicer
Copy link
Member

@joshspicer joshspicer commented Aug 18, 2021

closes #1000

Updates our versions of go to track latest supported

TODO

  • Test with dev tag
  • Bump repo version to do full release
  • Update tracking issue
  • Pull into Codespaces

@joshspicer joshspicer requested a review from Chuxel August 18, 2021 17:29
@joshspicer
Copy link
Member Author

builds fine in remote containers 👍
image

Copy link
Member

@Chuxel Chuxel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two things.

It looks like there's a bug in the go-debian script this exposed. It turns out that go version emits a version of go1.17 instead of go1.17.0 like you'd normally expect.

Therefore this line

if [[ "1.16" > "$(go version | grep -oP 'go\K[0-9]+\.[0-9]+\.[0-9]+')" ]]; then

needs to make the last section of the semver optional. I think this should do it:

if [[ "1.16" > "$(go version | grep -oP 'go\K[0-9]+\.[0-9]+(\.[0-9]+)?')" ]]; then

Go 1.17 recommends using "go install" for CLIs instead of "go get", but older versions still need the old syntax. So this detects the actually installed version (since we may have skipped installing go itself) and only uses go install for go 1.16+.

The other is a minor tweak inline...

@joshspicer
Copy link
Member Author

nice - that looks good
image

@Chuxel Chuxel self-requested a review August 19, 2021 15:06
@Chuxel
Copy link
Member

Chuxel commented Aug 19, 2021

@joshspicer Looks good! Feel free to merge when ready!

@joshspicer joshspicer merged commit b1ddc8d into main Aug 19, 2021
@joshspicer joshspicer deleted the go/1.17 branch August 19, 2021 15:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Updating go container to latest release (1.17) and dropping unsupported (1.15)
2 participants