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

Improve local development #46

Closed
mcristina422 opened this issue Apr 9, 2019 · 1 comment
Closed

Improve local development #46

mcristina422 opened this issue Apr 9, 2019 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers Hacktoberfest help wanted Extra attention is needed

Comments

@mcristina422
Copy link

Problems

While working on PR #44 I came across some problems with the Makefile and configure script.

The golangci-lint step does not properly install the linter. It follows the steps here but the Makefile doesn't properly execute it. It attempts to install to /bin due to improper syntax here
It can be fixed by changing the $() to $$()

golangci-lint:
	@ if [ ! $$(which golangci-lint) ]; then \
		curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $$(go env GOPATH)/bin v1.15.0; \
	fi

The install-kubebuilder-tools step fails.
It tries to install to /usr/local/ which requires elevated privileges. Following the setup instructions here they use sudo and add /usr/local/kubebuilder/bin to $PATH as well

Workarounds

Working from a Mac I needed to do a few extra steps

The configure script is dependent on Bash 4 while Macs come with Bash 3.2 by default https://github.com/pusher/wave/blob/master/configure#L3

I was able to upgrade painlessly with brew update && brew install bash
I manually installed golangci-lint with curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.15.0 (or apply the fix above)
I manually installed kubebuilder following the steps here

@mcristina422
Copy link
Author

Fixed in #71

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers Hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants