forked from onosproject/onos-ric-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
39 lines (28 loc) · 1.4 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
# SPDX-FileCopyrightText: 2020-present Open Networking Foundation <[email protected]>
#
# SPDX-License-Identifier: Apache-2.0
export CGO_ENABLED=1
export GO111MODULE=on
.PHONY: build
ONOS_PROTOC_VERSION := v0.6.3
all: test
build-tools:=$(shell if [ ! -d "./build/build-tools" ]; then cd build && git clone https://github.com/onosproject/build-tools.git; fi)
include ./build/build-tools/make/onf-common.mk
mod-update: # @HELP Download the dependencies to the vendor folder
go mod tidy
go mod vendor
mod-lint: mod-update # @HELP ensure that the required dependencies are in place
# dependencies are vendored, but not committed, go.sum is the only thing we need to check
bash -c "diff -u <(echo -n) <(git diff go.sum)"
test: # @HELP run the unit tests and source code validation
test: mod-lint linters license
go test github.com/onosproject/onos-ric-sdk-go/pkg/...
jenkins-test: # @HELP run the unit tests and source code validation producing a junit style report for Jenkins
jenkins-test: mod-lint linters license
TEST_PACKAGES=github.com/onosproject/onos-ric-sdk-go/pkg/... ./build/build-tools/build/jenkins/make-unit
publish: # @HELP publish version on github and dockerhub
./build/build-tools/publish-version ${VERSION}
jenkins-publish: # @HELP Jenkins calls this to publish artifacts
./build/build-tools/release-merge-commit
clean:: # @HELP remove all the build artifacts
rm -rf ./build/_output ./vendor