-
Notifications
You must be signed in to change notification settings - Fork 0
added m2m example + readme #11
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
added m2m example + readme #11
Conversation
MaartendeKruijf
left a comment
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.
Add a build action to the CI look good
Makefile
Outdated
| .PHONY: test lint build dev | ||
| .DEFAULT_GOAL := dev | ||
|
|
||
| EXAMPLE_DIRS := $(shell find examples -name "go.mod" -exec dirname {} \;) | ||
|
|
||
| define generate_build_target | ||
| .PHONY: build-$(1) | ||
| build-$(1): | ||
| cd $(1) && go build ./... | ||
| endef | ||
|
|
||
|
|
||
| #for each a seperate build target | ||
| $(foreach dir,$(EXAMPLE_DIRS),$(eval $(call generate_build_target,$(dir)))) | ||
|
|
||
| # that is called here | ||
| build: $(patsubst %,build-%,$(EXAMPLE_DIRS)) | ||
|
|
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.
Just make it explicit this is unreadable
|
|
||
|
|
||
| build: | ||
| name: Build project |
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.
Build example
Makefile
Outdated
| EXAMPLE_DIRS := $(shell find examples -name "go.mod" -exec dirname {} \;) | ||
|
|
||
| define generate_build_target | ||
| .PHONY: build-$(1) |
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.
You are overwriting your .PHONY here
3e66c50 to
a75657c
Compare
cb1221f to
954daed
Compare
No description provided.