-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (24 loc) · 789 Bytes
/
Makefile
File metadata and controls
32 lines (24 loc) · 789 Bytes
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
# gostack - Fake OpenStack API for integration tests
SHELL := /bin/bash
.SHELLFLAGS := -euo pipefail -c
BINARY_NAME ?= fake-openstack
GOFLAGS ?= -v
LDFLAGS ?= -s -w
.PHONY: all build test lint clean help
all: build
build:
go build $(GOFLAGS) -ldflags="$(LDFLAGS)" -o bin/$(BINARY_NAME) ./cmd/fake-openstack
test:
go test ./... -v -count=1
lint:
@which golangci-lint >/dev/null 2>&1 || (echo "golangci-lint not installed, run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest" && exit 1)
golangci-lint run ./...
clean:
rm -rf bin/
go clean -cache -testcache
help:
@echo "Targets:"
@echo " build - Build fake-openstack binary (default)"
@echo " test - Run tests"
@echo " lint - Run golangci-lint"
@echo " clean - Remove build artifacts"