forked from kelseyhightower/confd
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (32 loc) · 1 KB
/
Makefile
File metadata and controls
42 lines (32 loc) · 1 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
.PHONY: build install clean lint test integration dep release
VERSION=$(shell git describe --tags --always --dirty 2>/dev/null | sed 's/^v//' || echo "dev")
GIT_SHA=$(shell git rev-parse --short HEAD 2>/dev/null || echo "unknown")
build:
@echo "Building confd..."
@mkdir -p bin
@go build -ldflags "-X main.Version=$(VERSION) -X main.GitSHA=$(GIT_SHA)" -o bin/confd ./cmd/confd
install:
@echo "Installing confd..."
@install -c bin/confd /usr/local/bin/confd
clean:
@rm -f bin/*
lint:
@echo "Running linters..."
@golangci-lint run ./...
test:
@echo "Running tests..."
@go test `go list ./... | grep -v vendor/`
integration:
@echo "Running integration tests..."
@for i in `find ./test/integration -name test.sh`; do \
echo "Running $$i"; \
bash $$i || exit 1; \
bash test/integration/shared/expect/check.sh || exit 1; \
rm /tmp/confd-*; \
done
mod:
@go mod tidy
snapshot:
@goreleaser release --snapshot --skip=publish --clean
release:
@goreleaser release --skip=publish --clean --skip=validate