VOL-4925 - Build and release components.
Misc
----
o Bulk update copyright notice to 2023.
Makefile
makefiles/*
-----------
o Replace rm -rf with make builtin $(RM) -r
o Move help target into makefiles/help.
go.mod
go.sum
------
o Update opencord dependencies to the latest released versions.
Change-Id: I56eba94ddf878b318277b9e46a98053fae36ffcf
diff --git a/Makefile b/Makefile
index 453976e..0bd7c9f 100644
--- a/Makefile
+++ b/Makefile
@@ -77,10 +77,10 @@
## Local Development Helpers
local-protos: ## Copies a local version of the voltha-protos dependency into the vendor directory
ifdef LOCAL_PROTOS
- rm -rf vendor/github.com/opencord/voltha-protos/v5/go
+ $(RM) -r vendor/github.com/opencord/voltha-protos/v5/go
mkdir -p vendor/github.com/opencord/voltha-protos/v5/go
cp -r ${LOCAL_PROTOS}/go/* vendor/github.com/opencord/voltha-protos/v5/go
- rm -rf vendor/github.com/opencord/voltha-protos/v5/go/vendor
+ $(RM) -r vendor/github.com/opencord/voltha-protos/v5/go/vendor
endif
local-lib-go: ## Copies a local version of the voltha-lib-go dependency into the vendor directory
@@ -148,7 +148,7 @@
## -----------------------------------------------------------------------
## -----------------------------------------------------------------------
-lint: local-lib-go lint-mod lint-dockerfile ## Run all lint targets
+lint: local-lib-go lint-mod lint-dockerfile
## -----------------------------------------------------------------------
## -----------------------------------------------------------------------
@@ -162,37 +162,28 @@
## -----------------------------------------------------------------------
## -----------------------------------------------------------------------
-sca: ## Runs static code analysis with the golangci-lint tool
- @rm -rf ./sca-report
+sca:
+ @$(RM) -r ./sca-report
@mkdir -p ./sca-report
@echo "Running static code analysis..."
- @${GOLANGCI_LINT} run --deadline=6m --out-format junit-xml ./... | tee ./sca-report/sca-report.xml
+ @${GOLANGCI_LINT} run --deadline=6m --out-format junit-xml ./... \
+ | tee ./sca-report/sca-report.xml
@echo ""
@echo "Static code analysis OK"
## -----------------------------------------------------------------------
## -----------------------------------------------------------------------
-clean: distclean ## Removes any local filesystem artifacts generated by a build
+clean: distclean
## -----------------------------------------------------------------------
## -----------------------------------------------------------------------
-distclean: ## Removes any local filesystem artifacts generated by a build or test run
- rm -rf ./sca-report
+distclean:
+ $(RM) -r ./sca-report
## -----------------------------------------------------------------------
## -----------------------------------------------------------------------
-mod-update: ## Update go mod files
+mod-update:
${GO} mod tidy
${GO} mod vendor
-## -----------------------------------------------------------------------
-## -----------------------------------------------------------------------
-# For each makefile target, add ## <description> on the target line and it will be listed by 'make help'
-help :: ## Print help for each Makefile target
- @echo
- @echo "where available targets are:"
- @grep --no-filename '^[[:alpha:]_-]*:.* ##' $(MAKEFILE_LIST) \
- | sort \
- | awk 'BEGIN {FS=":.* ## "}; {printf "%-25s : %s\n", $$1, $$2};'
-
# [EOF]