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

Makefile: fix binary compilation #403

Merged
merged 3 commits into from
Jan 19, 2022
Merged

Makefile: fix binary compilation #403

merged 3 commits into from
Jan 19, 2022

Conversation

waynr
Copy link
Contributor

@waynr waynr commented Jan 19, 2022

  • Makefile: set SHELL to bash (default is sh which doesn't have the [[ builtin)
  • Makefile: add echo to compile task to confirm build succeeds
  • Makefile: use go 1.17.6 to compile binary
  • workflow: require image to build before merging PRs

- name: Check out code into the Go module directory
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f

- name: Verify docker image builds
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This step should prevent us from merging PRs that don't build in the future.

@@ -18,18 +18,19 @@ else
GIT_TREE_STATE=dirty
endif

SHELL = bash
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We use [[ somewhere in this Makefile that has been failing in CI and on my dev machine because the default GNU make shell is sh.

COMMIT ?= $(shell git rev-parse HEAD)
BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
VERSION ?= $(shell cat VERSION)
REGISTRY ?= digitalocean
GO_VERSION ?= 1.15.2
GO_VERSION ?= 1.17.6
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This fixes

 Error: vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/metrics.go:21:2: cannot find package "." in:
	/go/src/github.com/digitalocean/digitalocean-cloud-controller-manager/vendor/io/fs
Error: make: *** [Makefile:68: compile] Error 1

@waynr waynr merged commit a82195c into master Jan 19, 2022
@waynr waynr deleted the wwarren/fix-binary-compile branch January 19, 2022 15:20
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.

3 participants