File tree 2 files changed +48
-1
lines changed
2 files changed +48
-1
lines changed Original file line number Diff line number Diff line change @@ -410,9 +410,14 @@ else
410
410
endif
411
411
.PHONY : fmt/shfmt
412
412
413
- lint : lint/shellcheck lint/go lint/ts lint/helm
413
+ lint : lint/shellcheck lint/go lint/ts lint/helm lint/site-icons
414
414
.PHONY : lint
415
415
416
+ lint/site-icons :
417
+ cd site/static/icons
418
+
419
+ .PHONY : lint/site-icons
420
+
416
421
lint/ts :
417
422
cd site
418
423
yarn && yarn lint
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ source " $( dirname " ${BASH_SOURCE[0]} " ) /lib.sh"
4
+ cdroot
5
+
6
+ cd site/static/icon
7
+
8
+ # These exceptions are here for backwards compatibility. All new icons should
9
+ # be SVG to minimize the size of our repo and our bundle.
10
+ exceptions=(
11
+ " aws.png"
12
+ " azure.png"
13
+ " docker.png"
14
+ " do.png"
15
+ " gcp.png"
16
+ " k8s.png"
17
+ )
18
+
19
+ function is_exception() {
20
+ local value=" $1 "
21
+ shift
22
+ for item; do
23
+ [[ " $item " == " $value " ]] && return 0
24
+ done
25
+ return 1
26
+ }
27
+
28
+ for file in * ; do
29
+ # Extract filename
30
+ filename=$( basename -- " $file " )
31
+
32
+ # Check if the file is in the exception list
33
+ if is_exception " $filename " " ${exceptions[@]} " ; then
34
+ continue
35
+ fi
36
+
37
+ # If not an exception, check if it's an svg file
38
+ if [[ " $file " != * .svg ]]; then
39
+ echo " Found a non-svg file not in exception list: $file "
40
+ exit 1
41
+ fi
42
+ done
You can’t perform that action at this time.
0 commit comments