Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Makefile to check Go version before compiling #226

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jasonsopko
Copy link

Checks to make sure that Go version 1.19 is being used before compiling. There are potential issues when running binaries compiled with different versions of Go, and this should help minimalize this from happening.

Checks to make sure that Go version 1.19 is being used before compiling. There are potential issues when running binaries compiled with different versions of Go, and this should help minimalize this from happening.
@angelorc
Copy link
Collaborator

I tried to execute make check-go-version but I'm getting an error that the command is not available. How can I test it?

@jasonsopko
Copy link
Author

jasonsopko commented Mar 10, 2023

check-go-version is called when you try to run the following commands:

make all
make build
make build-linux
make install
make build-docker-go-bitsong
make test-docker
make test-docker-push
make proto-all
make test-unit
make test-race
make test-cover
make lint

It checks the version of Go being used, and if it is not go1.19 it will throw an error and stop. You can test by using different version of go (v1.18, v1.20 and v1.19) and running the above commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants