From 4f8c29be2ff8b81f65511ed73d5c0010a65631ab Mon Sep 17 00:00:00 2001 From: David Gageot Date: Tue, 31 Dec 2019 11:40:15 +0100 Subject: [PATCH] Move man generation to hack folder Signed-off-by: David Gageot --- hack/generate-man.sh | 2 +- {cmd/skaffold => hack}/man/man.go | 0 {cmd/skaffold => hack}/man/man_test.go | 4 ++-- 3 files changed, 3 insertions(+), 3 deletions(-) rename {cmd/skaffold => hack}/man/man.go (100%) rename {cmd/skaffold => hack}/man/man_test.go (85%) diff --git a/hack/generate-man.sh b/hack/generate-man.sh index ba29e1a5154..9302b8a8314 100755 --- a/hack/generate-man.sh +++ b/hack/generate-man.sh @@ -16,5 +16,5 @@ cat \ docs/content/en/docs/references/cli/index_header \ - <(go run cmd/skaffold/man/man.go) \ + <(go run hack/man/man.go) \ > docs/content/en/docs/references/cli/_index.md diff --git a/cmd/skaffold/man/man.go b/hack/man/man.go similarity index 100% rename from cmd/skaffold/man/man.go rename to hack/man/man.go diff --git a/cmd/skaffold/man/man_test.go b/hack/man/man_test.go similarity index 85% rename from cmd/skaffold/man/man_test.go rename to hack/man/man_test.go index 3f6ebcb3626..6615141e2bd 100644 --- a/cmd/skaffold/man/man_test.go +++ b/hack/man/man_test.go @@ -40,11 +40,11 @@ func TestPrintMan(t *testing.T) { testutil.CheckContains(t, "Env vars", output) // Compare to current man page - header, err := ioutil.ReadFile(filepath.Join("..", "..", "..", "docs", "content", "en", "docs", "references", "cli", "index_header")) + header, err := ioutil.ReadFile(filepath.Join("..", "..", "docs", "content", "en", "docs", "references", "cli", "index_header")) testutil.CheckError(t, false, err) header = bytes.Replace(header, []byte("\r\n"), []byte("\n"), -1) - expected, err := ioutil.ReadFile(filepath.Join("..", "..", "..", "docs", "content", "en", "docs", "references", "cli", "_index.md")) + expected, err := ioutil.ReadFile(filepath.Join("..", "..", "docs", "content", "en", "docs", "references", "cli", "_index.md")) testutil.CheckError(t, false, err) expected = bytes.Replace(expected, []byte("\r\n"), []byte("\n"), -1)