Skip to content

Commit

Permalink
Disable urfave markdown/man docs generation
Browse files Browse the repository at this point in the history
From urfave/cli#1383 :
> This removes the resulting binary dependency on cpuguy83/md2man and
> russross/blackfriday (and a few more packages imported by those),
> which saves more than 400 KB (more than 300 KB
> once stripped) from the resulting binary.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
  • Loading branch information
brandond committed Jun 15, 2022
1 parent a9b5a19 commit 06721e9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -108,7 +108,7 @@ require (
github.com/sirupsen/logrus v1.8.1
github.com/stretchr/testify v1.7.0
github.com/tchap/go-patricia v2.3.0+incompatible // indirect
github.com/urfave/cli v1.22.4
github.com/urfave/cli v1.22.9
github.com/vishvananda/netlink v1.2.1-beta.2
github.com/yl2chen/cidranger v1.0.2
go.etcd.io/etcd/api/v3 v3.5.4
Expand Down
3 changes: 2 additions & 1 deletion go.sum
Expand Up @@ -1222,8 +1222,9 @@ github.com/ulikunitz/xz v0.5.8 h1:ERv8V6GKqVi23rgu5cj9pVfVzJbOqAY2Ntl88O6c2nQ=
github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/urfave/cli v1.22.4 h1:u7tSpNPPswAFymm8IehJhy4uJMlUuU/GmqSkvJ1InXA=
github.com/urfave/cli v1.22.4/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/urfave/cli v1.22.9 h1:cv3/KhXGBGjEXLC4bH0sLuJ9BewaAbpk5oyMOveu4pw=
github.com/urfave/cli v1.22.9/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI=
github.com/urfave/cli/v2 v2.5.1 h1:YKwdkyA0xTBzOaP2G0DVxBnCheHGP+Y9VbKAs4K1Ess=
github.com/urfave/cli/v2 v2.5.1/go.mod h1:oDzoM7pVwz6wHn5ogWgFUU1s4VJayeQS+aEZDqXIEJs=
Expand Down
2 changes: 1 addition & 1 deletion scripts/build
Expand Up @@ -48,7 +48,7 @@ LDFLAGS="
STATIC="
-extldflags '-static -lm -ldl -lz -lpthread'
"
TAGS="apparmor seccomp netcgo osusergo providerless"
TAGS="apparmor seccomp netcgo osusergo providerless urfave_cli_no_docs"
RUNC_TAGS="apparmor seccomp"
RUNC_STATIC="static"

Expand Down
3 changes: 2 additions & 1 deletion scripts/package-cli
Expand Up @@ -58,8 +58,9 @@ LDFLAGS="
-X github.com/k3s-io/k3s/pkg/version.GitCommit=${COMMIT:0:8}
-w -s
"
TAGS="urfave_cli_no_docs"
STATIC="-extldflags '-static'"
CGO_ENABLED=0 "${GO}" build -ldflags "$LDFLAGS $STATIC" -o ${CMD_NAME} ./cmd/k3s/main.go
CGO_ENABLED=0 "${GO}" build -tags "$TAGS" -ldflags "$LDFLAGS $STATIC" -o ${CMD_NAME} ./cmd/k3s/main.go

stat ${CMD_NAME}

Expand Down

0 comments on commit 06721e9

Please sign in to comment.