-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile
41 lines (31 loc) · 1 KB
/
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
########################################################################
# Copyright (c) Intel Corporation 2023
# SPDX-License-Identifier: BSD-3-Clause
########################################################################
.PHONY: build tidy test clean docker
GO=CGO_ENABLED=1 go
SERVICE_NAME=file-watcher
build:
make -C ../ $(SERVICE_NAME)
tidy:
go mod tidy
verify:
if [ "`git diff ./clients/data_organizer`" = "" ]; then \
echo "No changes in client file detected."; \
else \
echo "Changes detected in client file. \n Updating mock."; \
$(MAKE) client-update; \
fi
echo "Clients for $(SERVICE_NAME) verified."
echo
client-update:
mockery --dir=./clients/data_organizer --output=./clients/data_organizer/mocks --all
docker:
make -C ../ docker-$(SERVICE_NAME)
test:
$(GO) test -coverprofile=coverage.out ./...
$(GO) vet ./...
gofmt -l $$(find . -type f -name '*.go'| grep -v "/vendor/")
[ "`gofmt -l $$(find . -type f -name '*.go'| grep -v "/vendor/")`" = "" ]
clean:
rm -f ms-$(SERVICE_NAME)