tube/Makefile

39 lines
701 B
Makefile
Raw Normal View History

2020-03-30 11:23:18 +03:00
.PHONY: dev setup build install image test release clean
CGO_ENABLED=0
VERSION=$(shell git describe --abbrev=0 --tags)
COMMIT=$(shell git rev-parse --short HEAD)
all: dev
dev: build
@./tube -v
setup:
@go get github.com/GeertJohan/go.rice/rice
build: clean
2020-03-21 04:03:00 +03:00
@command -v rice > /dev/null || make setup
@go generate $(shell go list)/...
@go build \
-tags "netgo static_build" -installsuffix netgo \
2020-12-26 01:26:09 +03:00
-ldflags "-w -X main.Version=$(VERSION) -X main.Commit=$(COMMIT)" \
.
install: build
@go install
docker-image:
2020-03-30 11:23:18 +03:00
@docker build -t prologic/tube .
docker-run:
@docker run -p 8000:8000 -t prologic/tube .
2020-03-30 11:23:18 +03:00
test: install
@go test
release:
@./tools/release.sh
clean:
@git clean -f -d -X