NAME = rexclient

VERSION_FILE := ../VERSION.txt
REX_VERSION ?= $(shell cat $(VERSION_FILE))

build: commit.txt
	go build -tags no_emoji -trimpath -ldflags="-s -w -X main.rex_version=$(REX_VERSION)" -buildvcs=false -o $(NAME)

run: commit.txt
	go run .

debug: commit.txt
	go run -tags debug,hints .

commit.txt:
	go generate

clean:
	rm -f $(NAME)