-
Notifications
You must be signed in to change notification settings - Fork 113
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
Check minimum required go version when build #1760
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
@gmgigi96 please provide a changelog as per CI |
@gmgigi96 I don't see the echo output, just the command invocation even though my version is lower than the recommended one $ make build [12:22:29]
GOPROXY=off
echo BUILD_DATE=`date +%FT%T%z`
BUILD_DATE=2021-06-04T12:22:33+0200
echo GIT_COMMIT=`git rev-parse --short HEAD`
GIT_COMMIT=288eafd9
echo GIT_DIRTY=`git diff-index --quiet HEAD -- || echo "dirty-"`
GIT_DIRTY=dirty-
echo VERSION=`git describe --always`
VERSION=v1.7.0-65-g288eafd9
echo GO_VERSION=1.15.0
GO_VERSION=1.15.0
`go env GOPATH`/bin/goimports -w tools pkg internal cmd
echo -e "1.16.2\n15.0" | sort -Vc &> /dev/null || echo -e "\n\033[33;5m[WARNING]\033[0m You are using a not supported go version. Please use 1.16.2 or above.\n"
go build -ldflags "-X main.gitCommit=`git rev-parse --short HEAD` -X main.version=`git describe --always` -X main.goVersion=1.15.0 -X main.buildDate=`date +%FT%T%z`" -o ./cmd/revad/revad ./cmd/revad
go build -ldflags "-X main.gitCommit=`git rev-parse --short HEAD` -X main.version=`git describe --always` -X main.goVersion=1.15.0 -X main.buildDate=`date +%FT%T%z`" -o ./cmd/reva/reva ./cmd/reva |
@ishank011 could you paste me your |
I set |
Ah my bad. It's supposed to be |
I was asking because in my machine and other different machines the third argument of |
Of course, thanks |
Now should work also if you don't put go before the version |
grammar correction Co-authored-by: Ishank Arora <[email protected]>
When build reva, if go version is below the minimum required, it will warn the user with a message.
Closes #1758