forked from cloudradar/frontman
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (39 loc) · 1.15 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
.PHONY: all
PROJECT_DIR=/go/src/github.com/cloudradar-monitoring/frontman
ifeq ($(RELEASE_MODE),)
RELEASE_MODE=release-candidate
endif
ifeq ($(RELEASE_MODE),release-candidate)
SELF_UPDATES_FEED_URL="https://repo.cloudradar.io/windows/frontman/feed/rolling"
endif
ifeq ($(RELEASE_MODE),stable)
SELF_UPDATES_FEED_URL="https://repo.cloudradar.io/windows/frontman/feed/stable"
endif
# Go parameters
GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOGET=$(GOCMD) get
GORUN=$(GOCMD) run
BINARY_NAME=frontman
all: test build
build:
$(GOBUILD) -v ./cmd/frontman/...
test:
$(GOTEST) -v ./...
test-short:
$(GOTEST) -short -v ./...
clean:
$(GOCLEAN)
rm -f $(BINARY_NAME)
run:
$(GORUN) -v ./cmd/frontman/...
goimports:
goimports -l $$(find . -type f -name '*.go' -not -path "./vendor/*")
goreleaser-precheck:
@if [ -z ${SELF_UPDATES_FEED_URL} ]; then echo "SELF_UPDATES_FEED_URL is empty"; exit 1; fi
goreleaser-rm-dist: goreleaser-precheck
SELF_UPDATES_FEED_URL=$(SELF_UPDATES_FEED_URL) goreleaser --rm-dist
goreleaser-snapshot: goreleaser-precheck
SELF_UPDATES_FEED_URL=$(SELF_UPDATES_FEED_URL) goreleaser --snapshot --rm-dist