-
Notifications
You must be signed in to change notification settings - Fork 566
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
Fix windows build following goreleaser migration #5487
Conversation
Makefile
Outdated
@@ -14,7 +14,7 @@ else | |||
export GC_FLAGS = "all=-trimpath=${PWD}" | |||
endif | |||
|
|||
export LD_FLAGS = github.com/pachyderm/pachyderm/src/client/version.AdditionalVersion=$(VERSION_ADDITIONAL) | |||
export LD_FLAGS="-X github.com/pachyderm/pachyderm/src/client/version.AdditionalVersion=$(VERSION_ADDITIONAL)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem with -X here is that it will fail the pachctl release (goreleaser/pachctl.yaml). Hence the need to remove it from the Makefile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case, we should export an environment variable for the key/value pair without the -X
(which is not LD_FLAGS
), because this is an improper format for LD_FLAGS
. I'll update this.
etc/compile/vscode_compile_task.sh
Outdated
export LD_FLAGS="-X github.com/pachyderm/pachyderm/src/client/version.AdditionalVersion=${VERSION_ADDITIONAL}" | ||
|
||
goreleaser release -p 1 --snapshot --skip-publish --rm-dist -f "${REPO_DIR}/goreleaser/docker.yml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am guessing there is a good reason why we cannot call make docker-build here? If you could, this code would look like...
cd $REPO_DIR
make docker-build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I wrote this to require as few extra tools as possible, and make
doesn't exist on windows without jumping through a few hoops - unfortunately I think what you said is just the right thing to do, so I rewrote this to use make
and we can get rid of all this duplication.
Your website preview is ready! Hooray! 🎉 Built with commit 36f9151 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review that delete code are the best.
LGTM
This actually went smoother than expected, but still a couple changes to fix the windows build:
LD_FLAGS
back to specifying-X
within the env var,LD_FLAGS
should be concatenablevscode_compile_task.sh
build script to usegoreleaser