-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
32 lines (24 loc) · 1005 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
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2023 Dell Inc, or its subsidiaries.
ROOT_DIR='.'
PROJECTNAME=$(shell basename "$(PWD)")
# Make is verbose in Linux. Make it silent.
MAKEFLAGS += --silent
go-compile: go-get go-build
go-build:
@echo " > Building binaries..."
@CGO_ENABLED=0 go build -o ${PROJECTNAME} .
go-get:
@echo " > Checking if there are any missing dependencies..."
@CGO_ENABLED=0 go get .
go-test:
@echo " > Running ginkgo test suites..."
# can replace with a recursive command ginkgo suites are defined for all packages
ginkgo grpc inventory
mock-generate:
@echo " > Starting mock code generation..."
# Generate mocks for exported interfaces
mockery --config=mocks/.mockery.yaml --name=Connector --dir=grpc
mockery --config=mocks/.mockery.yaml --name=InvClient --dir=inventory
# Generate mocks for imported protobuf clients too
mockery --config=mocks/.mockery.yaml --name=InventorySvcClient --srcpkg=github.com/opiproject/opi-api/inventory/v1/gen/go