soft-serve

Fork https://github.com/charmbracelet/soft-serve

git clone git://git.lin.moe/go/soft-serve.git

 1APP_BIN = soft
 2VERSION = 0.11.2-noui
 3GOFLAGS := -buildmode=pie -modcacherw -trimpath -buildvcs=false
 4GO_TAGS :=
 5
 6ifeq "$(shell pkg-config sqlite3; echo $$?)" "0"
 7	GO_TAGS += libsqlite3
 8endif
 9space := $(subst ,, )
10comma=,
11GOFLAGS += -tags=$(subst $(space),$(comma),$(strip $(GO_TAGS)))
12BUILD_LDFLAGS="-X main.Version=$(VERSION)"
13
14.PHONY: build
15build:
16	go build $(GOFLAGS) -ldflags $(BUILD_LDFLAGS) -o $(APP_BIN) ./cmd/soft
17
18check:
19	go test -v ./...
20.PHONY: clean
21clean:
22	go clean
23	rm -f $(APP_BIN)
24	rm -rf ./tmp/
25