forked from integr8ly/delorean
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (32 loc) · 737 Bytes
/
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
include ./make/*.mk
SHELL=/usr/bin/env bash -o pipefail
BUILD_TARGET=./
all: test
.PHONY: all
test: test/lint test/unit
.PHONY: test
test/lint:
@shellcheck scripts/ocm/*.sh
.PHONY: lint
test/unit:
go test -v ./cmd ./pkg/...
.PHONY: test
format:
@echo "ToDo Implement me (format)!!"
.PHONY: format
build/cli:
GOFLAGS=-mod=vendor go build -o=$(BUILD_TARGET) .
.PHONY: build
.PHONY: code/check
code/check:
@diff -u <(echo -n) <(gofmt -d `find . -type f -name '*.go' -not -path "./vendor/*"`)
.PHONY: code/fix
code/fix:
@gofmt -w `find . -type f -name '*.go' -not -path "./vendor/*"`
.PHONY: vendor/check
vendor/check: vendor/fix
git diff --exit-code vendor/ go.*
.PHONY: vendor/fix
vendor/fix:
go mod tidy
go mod vendor