[VOL-5051] - Build and deploy voltctl
[VOL-5152]
[VOL-4961]
[VOL-5063]
[VOL-4966]
[VOL-4893]
[VOL-4906]
go.mod
go.sum
vendor/modules.txt
------------------
o Update voltha-lib-go dep to 7.5.3
o Update voltha-protos dep to 5.4.11
o make mod-update
Makefile
makefiles/
o Add more repo:onf-make makefile logic
o make LOCAL_FIX_PERMS=1 mod-update need to work around docker perm problems.
internal/
pkg/
vendor/
---------
o Update copyright ending date to span 2024.
o make mod-update to regenerate vendor/
Change-Id: Ib89fd6a9cc15c7e08b1274b110dd8141832557e9
diff --git a/Makefile b/Makefile
index a8c4483..ffb5650 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
# -*- makefile -*-
# -----------------------------------------------------------------------
-# Copyright 2019-2023 Open Networking Foundation
+# Copyright 2019-2024 Open Networking Foundation (ONF) and the ONF Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -156,8 +156,9 @@
@git status > /dev/null
@git diff-index --quiet HEAD -- go.mod go.sum vendor || (echo "ERROR: Staged or modified files must be committed before running this test" && git status -- go.mod go.sum vendor && exit 1)
@[[ `git ls-files --exclude-standard --others go.mod go.sum vendor` == "" ]] || (echo "ERROR: Untracked files must be cleaned up before running this test" && git status -- go.mod go.sum vendor && exit 1)
- $(GO) mod tidy
- $(GO) mod vendor
+
+ $(HIDE)$(MAKE) --no-print-directory mod-update
+
@git status > /dev/null
@git diff-index --quiet HEAD -- go.mod go.sum vendor || (echo "ERROR: Modified files detected after running go mod tidy / go mod vendor" && git status -- go.mod go.sum vendor && git checkout -- go.mod go.sum vendor && exit 1)
@[[ `git ls-files --exclude-standard --others go.mod go.sum vendor` == "" ]] || (echo "ERROR: Untracked files detected after running go mod tidy / go mod vendor" && git status -- go.mod go.sum vendor && git checkout -- go.mod go.sum vendor && exit 1)
@@ -168,6 +169,10 @@
endif
## -----------------------------------------------------------------------
+## -----------------------------------------------------------------------
+# lint: lint-mod lint-dockerfile ## Run all lint targets
+
+## -----------------------------------------------------------------------
## Intent: Syntax check golang source
## See Also: makefilles/lint/golang/sca.mk
## -----------------------------------------------------------------------
@@ -202,9 +207,35 @@
## -----------------------------------------------------------------------
## -----------------------------------------------------------------------
-mod-update:
- $(GO) mod tidy
- $(GO) mod vendor
+.PHONY: mod-update
+mod-update: go-version mod-tidy mod-vendor
+
+## -----------------------------------------------------------------------
+## -----------------------------------------------------------------------
+.PHONY: go-version
+go-version :
+ $(call banner-enter,Target $@)
+ ${GO} version
+ $(call banner-leave,Target $@)
+
+## -----------------------------------------------------------------------
+## -----------------------------------------------------------------------
+.PHONY: mod-tidy
+mod-tidy :
+ $(call banner-enter,Target $@)
+ ${GO} mod tidy
+ $(call banner-leave,Target $@)
+
+## -----------------------------------------------------------------------
+## -----------------------------------------------------------------------
+.PHONY: mod-vendor
+mod-vendor : mod-tidy
+mod-vendor :
+ $(call banner-enter,Target $@)
+ $(if $(LOCAL_FIX_PERMS),chmod o+w $(CURDIR))
+ ${GO} mod vendor
+ $(if $(LOCAL_FIX_PERMS),chmod o-w $(CURDIR))
+ $(call banner-leave,Target $@)
## ---------------------------------------------------------
## ---------------------------------------------------------
@@ -223,7 +254,7 @@
go-clean-args += -r # recursive
go-clean-args += -x # verbose removal
-sterile: clean
+sterile :: clean
$(GO) clean $(go-clean-cache)
$(GO) clean $(go-clean-args)