1
0
mirror of https://github.com/alice-lg/alice-lg.git synced 2024-05-11 05:55:03 +00:00

54 lines
796 B
Makefile
Raw Normal View History

2017-05-16 13:39:59 +02:00
#
2017-05-29 12:55:22 +02:00
# Alice LG Backend
# ----------------
2017-05-16 13:39:59 +02:00
#
PROG=alice-lg
ARCH=amd64
APP_VERSION=$(shell cat ../VERSION)
VERSION=$(APP_VERSION)_$(shell git rev-parse --short HEAD)
LOCAL_RPMS=RPMS
# OS Detection
UNAME=$(shell uname)
ifeq ($(UNAME), Darwin)
TARGET=osx
else
TARGET=linux
endif
2017-05-19 11:57:25 +02:00
LDFLAGS=-ldflags="-X main.version=$(APP_VERSION)"
2017-05-16 13:39:59 +02:00
all: $(TARGET)
@echo "Built $(VERSION) @ $(TARGET)"
2017-05-29 10:27:52 +02:00
deps:
go get .
osx: deps
2017-05-19 11:57:25 +02:00
GOARCH=$(ARCH) GOOS=darwin go build $(LDFLAGS) -o $(PROG)-osx-$(ARCH)
2017-05-16 13:39:59 +02:00
2017-05-29 10:27:52 +02:00
linux: deps
2017-05-19 11:57:25 +02:00
GOARCH=$(ARCH) GOOS=linux go build $(LDFLAGS) -o $(PROG)-linux-$(ARCH)
2017-05-16 13:39:59 +02:00
2017-05-22 17:58:27 +02:00
bundle:
rice embed-go
2017-05-16 13:39:59 +02:00
2018-06-26 00:10:53 +02:00
test:
go test -v
2017-05-16 13:39:59 +02:00
2017-07-04 11:34:53 +02:00
dev: clean all
2017-05-16 13:39:59 +02:00
clean:
2017-05-22 17:58:27 +02:00
rm -f rice-box.go
2017-05-16 13:39:59 +02:00
rm -f $(PROG)-osx-$(ARCH)
rm -f $(PROG)-linux-$(ARCH)
2017-06-30 11:12:01 +02:00
coverage:
go test -coverprofile=coverage.out
go tool cover -func=coverage.out