Skip to content

Commit 96e459d

Browse files
authored
feat: using l2 structure, cncf/landscape#3679 (#7)
1 parent 7ced93a commit 96e459d

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ python_lib_path = $(shell pip3 show -f omnigraffle-stencil | grep Location | awk
44

55
.PHONY: install
66
install:
7-
pip3 install omnigraffle-stencil
7+
pip3 install omnigraffle-stencil==1.1.0
88
pip3 install pyyaml==6.0.1
99

1010
.PHONY: patch
@@ -17,21 +17,22 @@ vendor:
1717
git clone --depth=1 $(source_git_url) vendor/landscape
1818

1919
.PHONY: build
20-
build: source_icons_version=$(shell git -C vendor/landscape log --format="%h" cached_logos | head -n 1)
20+
build: source_icons_version=$(shell git -C vendor/landscape log --format="%h" hosted_logos | head -n 1)
2121
build:
2222
mkdir -p output
2323
mkdir -p build/hosted_logos
24-
mkdir -p build/cached_logos
2524
mkdir -p build/final
2625
# height limits
27-
(cd vendor/landscape/cached_logos && find . -name "*.svg" -exec rsvg-convert -h 96 -f svg {} -o ../../../build/cached_logos/{} \;)
2826
(cd vendor/landscape/hosted_logos && find . -name "*.svg" -exec rsvg-convert -h 96 -f svg {} -o ../../../build/hosted_logos/{} \;)
2927
# grouping
30-
python scripts/group.py
28+
python3 scripts/group.py
3129
# build stencil
3230
omnigraffle-stencil --svg build/final --stencil-file ./output/cncf-$(source_icons_version).gstencil
3331
zip -r ./output/cncf-$(source_icons_version).gstencil.zip ./output/cncf-$(source_icons_version).gstencil
3432

3533
.PHONY: clean
3634
clean:
3735
rm -rf build
36+
rm -rf vendor
37+
pip3 uninstall -y omnigraffle-stencil
38+
pip3 install omnigraffle-stencil==1.1.0

scripts/group.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@
77
def copy(category, sub_category, logo):
88
os.makedirs(os.path.join(ROOT, 'build', 'final', category + " > " + sub_category), exist_ok=True)
99

10-
src = os.path.join(ROOT, 'build/cached_logos', logo)
10+
src = os.path.join(ROOT, 'build/hosted_logos', logo)
1111
if not os.path.isfile(src):
12-
src = os.path.join(ROOT, 'build/hosted_logos', logo)
13-
if not os.path.isfile(src):
14-
print('Not exist ' + src)
15-
return
12+
print('Not exist ' + src)
13+
return
1614
dest = os.path.join(ROOT, 'build', 'final', category + " > " + sub_category, logo)
1715

1816
copy2(src, dest)

0 commit comments

Comments
 (0)