aboutsummaryrefslogtreecommitdiffstats
path: root/heat/vFW_CNF_CDS/templates/Makefile
diff options
context:
space:
mode:
authorKonrad Bańka <k.banka@samsung.com>2021-05-21 13:22:29 +0200
committerKonrad Bańka <k.banka@samsung.com>2021-05-21 15:25:25 +0200
commit21757af846776cf5005e06d8c4a9c9dfd4eb6b6e (patch)
tree17be21a995ea78a6549def9d784e05149be2f06e /heat/vFW_CNF_CDS/templates/Makefile
parent8adaf0e65ffa62a117577ffabadefe4f779f8efb (diff)
[vFW_CNF_CDS] Sort generated json files
Sort generated generated _types.json files for easier comparison of changes between commits. Provide "jsonlint_cba" target to simply lint autogenerated _types.json files. Issue-ID: INT-1899 Signed-off-by: Konrad Bańka <k.banka@samsung.com> Change-Id: I83f6543f21a65cdd293aa72689766d2f4b48824e
Diffstat (limited to 'heat/vFW_CNF_CDS/templates/Makefile')
-rw-r--r--heat/vFW_CNF_CDS/templates/Makefile15
1 files changed, 13 insertions, 2 deletions
diff --git a/heat/vFW_CNF_CDS/templates/Makefile b/heat/vFW_CNF_CDS/templates/Makefile
index f81585fa..7a8db064 100644
--- a/heat/vFW_CNF_CDS/templates/Makefile
+++ b/heat/vFW_CNF_CDS/templates/Makefile
@@ -1,7 +1,9 @@
-.PHONY: all clean helm base cba clean_all package
+.PHONY: all clean helm base clean_all package cba jsonlint_cba
DUMMY_ONBOARDING_PACKAGE_NAME ?= vfw_k8s_demo
NATIVE_ONBOARDING_PACKAGE_NAME ?= native_vfw_k8s_demo
CBA_NAME ?= CBA
+_type_files = $(wildcard cba/Definitions/*_types.json)
+
clean_all:
$(MAKE) clean
@@ -17,7 +19,7 @@ all: package helm base cba
cp $(NATIVE_ONBOARDING_PACKAGE_NAME).zip ../automation/vsp/
helm: package
- make -C helm
+ $(MAKE) -C helm
mv helm/helm_*.tgz package_native/
mv helm/*.tgz package_dummy/
@@ -43,3 +45,12 @@ clean:
rm -rf cba_dummy
rm -f $(DUMMY_ONBOARDING_PACKAGE_NAME).zip
rm -f $(NATIVE_ONBOARDING_PACKAGE_NAME).zip
+
+jsonlint_cba: $(_type_files)
+ @:
+
+#This shouldn't be PHONY, but it's easier now to define this way
+.PHONY: $(_type_files)
+$(_type_files):
+ @which jq expand unexpand sponge >/dev/null
+ jq -S . <$@ | unexpand -t 2 | expand -t 4 | sponge $@