blob: 923e74623a349509b4516bf8f7489ab7ebd0a05f [file] [log] [blame]
Joey Armstrongae55f952022-11-29 16:20:27 -05001# -*- makefile -*-
2# -----------------------------------------------------------------------
3# Copyright 2022 Open Networking Foundation (ONF) and the ONF Contributors
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16# -----------------------------------------------------------------------
17
18##-------------------##
19##---] GLOBALS [---##
20##-------------------##
21env-clean = /usr/bin/env --ignore-environment
22xargs-n1 := xargs -0 -t -n1 --no-run-if-empty
23
24helmlint-sh := $(TOP)/helm-repo-tools/helmlint.sh
25chartcheck-sh := $(TOP)/helm-repo-tools/chart_version_check.sh
26
27##-------------------##
28##---] TARGETS [---##
29##-------------------##
30.PHONY: lint-helm
31.PHONY: lint-chart
32
33ifdef UNSTABLE
34 # Repair failures before enabling as a default.
35 lint : lint-helm
36 lint : lint-chart
37endif
38
39## -----------------------------------------------------------------------
40## -----------------------------------------------------------------------
41lint-helm: $(helmlint-sh)
42 $(helmlint-sh)
43
44## -----------------------------------------------------------------------
45## -----------------------------------------------------------------------
46lint-chart: $(chartcheck-sh)
47 $(chartcheck-sh)
48
49## -----------------------------------------------------------------------
50## -----------------------------------------------------------------------
51$(helmlint-sh) $(chartcheck-sh):
52 git clone "https://gerrit.opencord.org/helm-repo-tools"
53
54## -----------------------------------------------------------------------
55## -----------------------------------------------------------------------
56help::
57 @echo " lint-chart chart_version_check.sh"
58 @echo " lint-helm Syntax check helm configs"
59
60## -----------------------------------------------------------------------
61## -----------------------------------------------------------------------
62clean::
63 $(RM) -r $(TOP)/helm-repo-tools
64
65# [EOF]