SOURCES=$(shell find . -type f -name '*.go') VERSION_PKG := github.com/nsheridan/cashier/lib.Version VERSION := $(shell git describe --tags --always --dirty) IMAGE_NAME=benburwell/cashier all: cashier cashierd cashier: $(SOURCES) go build -o $@ -ldflags="-X $(VERSION_PKG)=$(VERSION)" ./cmd/$@ cashierd: $(SOURCES) go build -o $@ -ldflags="-X $(VERSION_PKG)=$(VERSION)" ./cmd/$@ .PHONY: docker docker: docker build -t "$(IMAGE_NAME)" . .PHONY: clean clean: rm -f cashier cashierd