-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
74 lines (50 loc) · 2.17 KB
/
Makefile
File metadata and controls
74 lines (50 loc) · 2.17 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
################################################################################
# This Makefile generated by GoMakeGen 1.3.0 using next command:
# gomakegen .
#
# More info: https://kaos.sh/gomakegen
################################################################################
.DEFAULT_GOAL := help
.PHONY = fmt vet all clean git-config help
################################################################################
DOCKER_IMAGE = funbox/bacula_exporter
VERSION := 1.1.0
BUMPVERSION_PART ?= patch
################################################################################
all: bacula_exporter ## Build all binaries
bacula_exporter: ## Build bacula_exporter binary
CGO_ENABLED=0 go build bacula_exporter.go
compress: ## Compress bacula_exporter binary
upx bacula_exporter
docker-build: ## Build Docker image
docker build -t $(DOCKER_IMAGE):$(VERSION) .
docker-push: ## Push Docker image
docker push $(DOCKER_IMAGE):$(VERSION)
chart: ## Build Helm chart
helm package charts/bacula_exporter
install: ## Install all binaries
cp bacula_exporter /usr/bin/bacula_exporter
uninstall: ## Uninstall all binaries
rm -f /usr/bin/bacula_exporter
git-config: ## Configure git redirects for stable import path services
git config --global http.https://pkg.re.followRedirects true
bump:
bump2version $(BUMPVERSION_PART)
fmt: ## Format source code with gofmt
find . -name "*.go" -exec gofmt -s -w {} \;
vet: ## Runs go vet over sources
go vet -composites=false -printfuncs=LPrintf,TLPrintf,TPrintf,log.Debug,log.Info,log.Warn,log.Error,log.Critical,log.Print ./...
clean: ## Remove generated files
rm -f bacula_exporter
rm -f *.tgz
################################################################################
dev:
docker-compose up -d
################################################################################
help: ## Show this info
@echo -e '\n\033[1mSupported targets:\033[0m\n'
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
| awk 'BEGIN {FS = ":.*?## "}; {printf " \033[33m%-17s\033[0m %s\n", $$1, $$2}'
@echo -e ''
@echo -e '\033[90mGenerated by GoMakeGen 1.3.0\033[0m\n'
################################################################################