File tree Expand file tree Collapse file tree 3 files changed +52
-0
lines changed
Expand file tree Collapse file tree 3 files changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ load ("@io_bazel_rules_go//go:def.bzl" , "go_library" )
2+
3+ # Minify the logo into a favicon.
4+ genrule (
5+ name = "favicon" ,
6+ srcs = [":buildbarn_logo.svg" ],
7+ outs = ["favicon.svg" ],
8+ # Remove embedded draw.io content attribute and svg comments.
9+ cmd = "tr -d '\n ' < $(location :buildbarn_logo.svg) | sed -e 's/ content=\" [^\" ]*\" //' -e 's/<!--[^!]*-->//g' > $@" ,
10+ )
11+
12+ go_library (
13+ name = "logo" ,
14+ srcs = ["logo.go" ],
15+ embedsrcs = [
16+ "favicon.svg" ,
17+ ],
18+ importpath = "github.com/buildbarn/bb-storage/pkg/logo" ,
19+ visibility = ["//visibility:public" ],
20+ )
Original file line number Diff line number Diff line change 1+ package logo
2+
3+ import (
4+ _ "embed" // For "go:embed".
5+ )
6+
7+ //go:embed favicon.svg
8+ var faviconSvg []byte
9+
10+ // FaviconSvg holds the Buildbarn logo and can be used as favicon in web browsers.
11+ var FaviconSvg = faviconSvg
You can’t perform that action at this time.
0 commit comments