f/Makefile

28 lines
458 B
Makefile

BINARY_NAME = f
.PHONY: build
build:
CGO_ENABLED=0 go build -v -o $(BINARY_NAME) .
.PHONY: build-updates
build-updates:
CGO_ENABLED=0 go build -v -tags arch_updates -o $(BINARY_NAME) .
# (build but with a smaller binary)
.PHONY: dist
dist:
CGO_ENABLED=0 go build -gcflags=all=-l -v -ldflags="-w -s" -o $(BINARY_NAME) ./cmd/$(BINARY_NAME)
.PHONY: run
run: build
./$(BINARY_NAME)
.PHONY: tidy
tidy:
go mod tidy
# auto restart
.PHONY: dev
dev:
air