Created
October 2, 2018 08:11
-
-
Save srbry/6cc26135013370b6ae09b1d4ee8fa948 to your computer and use it in GitHub Desktop.
Golang lambda compilation makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
help: | |
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | |
functions := $(shell find functions -name \*main.go | awk -F'/' '{print $$2}') | |
build: ## Build golang binaries | |
@dep ensure | |
@for function in $(functions) ; do \ | |
env GOOS=linux go build -ldflags="-s -w" -o bin/$$function functions/$$function/main.go ; \ | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment