Skip to content

Commit e3452d2

Browse files
committed
build: generate Zig badges
Signed-off-by: inge4pres <fgualazzi@gmail.com>
1 parent 2182eb5 commit e3452d2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

scripts/generate_badges.d

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,14 @@ import std.traits : EnumMembers;
1818
immutable string bazel_svg = `<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6 .16l5.786 5.786L6 11.732.214 5.946 6 .161zM0 6.214V12l5.786 5.786V12L0 6.214zM18 .16l5.786 5.786L18 11.732l-5.786-5.786L18 .161zM24 6.214V12l-5.786 5.786V12L24 6.214zM12 6.16l5.786 5.786L12 17.732l-5.786-5.786L12 6.161zM11.84 18.054v5.785l-5.786-5.785v-5.786l5.785 5.786zM12.16 18.054l5.786-5.786v5.786l-5.785 5.785v-5.785z" stroke="transparent" fill="white"/></svg>`;
1919
const string bazel_svg_base64 = Base64.encode(representation(bazel_svg));
2020

21+
immutable string zig_svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 153 140"><g fill="white"><g><polygon points="46,22 28,44 19,30"/><polygon points="46,22 33,33 28,44 22,44 22,95 31,95 20,100 12,117 0,117 0,22" shape-rendering="crispEdges"/><polygon points="31,95 12,117 4,106"/></g><g><polygon points="56,22 62,36 37,44"/><polygon points="56,22 111,22 111,44 37,44 56,32" shape-rendering="crispEdges"/><polygon points="116,95 97,117 90,104"/><polygon points="116,95 100,104 97,117 42,117 42,95" shape-rendering="crispEdges"/><polygon points="150,0 52,117 3,140 101,22"/></g><g><polygon points="141,22 140,40 122,45"/><polygon points="153,22 153,117 106,117 120,105 125,95 131,95 131,45 122,45 132,36 141,22" shape-rendering="crispEdges"/><polygon points="125,95 130,110 106,117"/></g></g></svg>`;
22+
const string zig_svg_base64 = Base64.encode(representation(zig_svg));
23+
2124
enum BuildSystem
2225
{
2326
CMake,
24-
Bazel
27+
Bazel,
28+
Zig
2529
}
2630

2731
enum Cpu
@@ -89,6 +93,8 @@ private:
8993
return url ~ "&logo=cmake";
9094
case BuildSystem.Bazel:
9195
return url ~ "&logo=data:image/svg%2bxml;base64," ~ bazel_svg_base64;
96+
case BuildSystem.Zig:
97+
return url ~ "&logo=data:image/svg%2bxml;base64," ~ zig_svg_base64;
9298
}
9399
}
94100

0 commit comments

Comments
 (0)