-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile.maker.yaml
60 lines (44 loc) · 1.59 KB
/
Makefile.maker.yaml
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
# Configuration file for <https://github.com/sapcc/go-makefile-maker>
metadata:
url: https://github.com/sapcc/maia
binaries:
- name: maia
fromPackage: .
installTo: bin/
golang:
setGoModVersion: true
dockerfile:
enabled: yes
golangciLint:
createConfig: true
githubWorkflow:
ci:
enabled: true
coveralls: true
prepareMakeTarget: generate
nix:
extraPackages:
- go-bindata
- mockgen
renovate:
enabled: true
assignees:
- notque
# TODO only run `go install` when necessary (cf. golangci-lint installation in the autogenerated "prepare-static-check" target)
# TODO replace go-bindata with <https://pkg.go.dev/embed>
verbatim: |
ifdef DEBUG
BINDDATA_FLAGS = -debug
endif
build/maia: generate
static-check: generate
generate: FORCE
if ! hash mockgen 2>/dev/null; then go install go.uber.org/mock/mockgen@latest; fi
if ! hash go-bindata 2>/dev/null; then go install github.com/go-bindata/go-bindata/go-bindata@v3.1.2+incompatible; fi
if ! hash addlicense 2>/dev/null; then go install github.com/google/addlicense@latest; fi
mockgen --source=pkg/storage/interface.go --destination=pkg/storage/genmock.go --package=storage
mockgen --source=pkg/keystone/interface.go --destination=pkg/keystone/genmock.go --package=keystone
go-bindata $(BINDDATA_FLAGS) -pkg ui -o pkg/ui/bindata.go -ignore '(.*\.map|bootstrap\.js|bootstrap-theme\.css|bootstrap\.css)' web/templates/... web/static/...
gofmt -s -w ./pkg/ui/bindata.go
# Add license header to the generated bindata.go file
addlicense -c "SAP SE" ./pkg/ui/bindata.go