summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: acb296179bbdfb6602517b524e0578d08a7a6d75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
.PHONY: build build-admin clean install install-admin

VERSION := $(shell git describe --tags --abbrev=0 2>/dev/null || echo "v0.1.0")
LDFLAGS := -X git.db.org.ai/dborg/internal/utils.Version=$(VERSION)

build:
	go build -ldflags "$(LDFLAGS)" -o dborg .

build-admin:
	go build -tags admin -ldflags "$(LDFLAGS)" -o dborg .

clean:
	rm -f dborg

install:
	go install -ldflags "$(LDFLAGS)" .

install-admin:
	go install -tags admin -ldflags "$(LDFLAGS)" .