Skip to content

Instantly share code, notes, and snippets.

Created December 13, 2018 17:29
What would you like to do?
Generic golang command Makefile
VERSION=$(shell git describe --tags)
BUILDFLAGS=-ldflags '-X main.Version=${VERSION}'
EXEC=$(shell basename "$(shell pwd)")
all: $(EXEC)
go build ${BUILDFLAGS}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment