Skip to content

Commit b0fa205

Browse files
committed
Remove 'this is HEAD' warning on docs
1 parent ffeb01f commit b0fa205

File tree

452 files changed

+2
-15361
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

452 files changed

+2
-15361
lines changed

cmd/mungedocs/BUILD

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ go_binary(
2121
"mungedocs.go",
2222
"preformatted.go",
2323
"toc.go",
24-
"unversioned_warning.go",
2524
"util.go",
2625
"whitespace.go",
2726
],

cmd/mungedocs/mungedocs.go

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
"fmt"
2222
"io/ioutil"
2323
"os"
24-
"os/exec"
2524
"path"
2625
"path/filepath"
2726
"strings"
@@ -50,11 +49,6 @@ Examples:
5049

5150
ErrChangesNeeded = errors.New("mungedocs: changes required")
5251

53-
// This records the files in the rootDir in upstream/latest-release
54-
filesInLatestRelease string
55-
// This indicates if the munger is running inside Jenkins
56-
inJenkins bool
57-
5852
// All of the munge operations to perform.
5953
// TODO: allow selection from command line. (e.g., just check links in the examples directory.)
6054
allMunges = []munge{
@@ -63,7 +57,6 @@ Examples:
6357
// Functions which modify state.
6458
{"remove-whitespace", updateWhitespace},
6559
{"table-of-contents", updateTOC},
66-
{"unversioned-warning", updateUnversionedWarning},
6760
{"md-links", updateLinks},
6861
{"blank-lines-surround-preformatted", updatePreformatted},
6962
{"header-lines", updateHeaderLines},
@@ -217,26 +210,6 @@ func main() {
217210
os.Exit(2)
218211
}
219212

220-
absRootDir, err := filepath.Abs(*rootDir)
221-
if err != nil {
222-
fmt.Fprintf(os.Stderr, "ERROR: %v\n", err)
223-
os.Exit(2)
224-
}
225-
inJenkins = len(os.Getenv("JENKINS_HOME")) != 0
226-
out, err := exec.Command("git", "ls-tree", "-r", "--name-only", fmt.Sprintf("%s/%s", *upstream, latestReleaseBranch), absRootDir).CombinedOutput()
227-
if err != nil {
228-
if inJenkins {
229-
fmt.Fprintf(os.Stderr, "output: %s,\nERROR: %v\n", out, err)
230-
os.Exit(2)
231-
} else {
232-
fmt.Fprintf(os.Stdout, "output: %s,\nERROR: %v\n", out, err)
233-
fmt.Fprintf(os.Stdout, "`git ls-tree -r --name-only %s/%s failed. We'll ignore this error locally, but Jenkins may pick an error. Munger uses the output of this command to determine in unversioned warning, if it should add a link to the doc in release branch.\n", *upstream, latestReleaseBranch)
234-
filesInLatestRelease = ""
235-
}
236-
} else {
237-
filesInLatestRelease = string(out)
238-
}
239-
240213
fp := fileProcessor{
241214
munges: wantedMunges(),
242215
verifyOnly: *verify,

cmd/mungedocs/unversioned_warning.go

Lines changed: 0 additions & 101 deletions
This file was deleted.

cmd/mungedocs/unversioned_warning_test.go

Lines changed: 0 additions & 149 deletions
This file was deleted.

docs/README.md

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,3 @@
1-
<!-- BEGIN MUNGE: UNVERSIONED_WARNING -->
2-
3-
<!-- BEGIN STRIP_FOR_RELEASE -->
4-
5-
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
6-
width="25" height="25">
7-
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
8-
width="25" height="25">
9-
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
10-
width="25" height="25">
11-
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
12-
width="25" height="25">
13-
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
14-
width="25" height="25">
15-
16-
<h2>PLEASE NOTE: This document applies to the HEAD of the source tree</h2>
17-
18-
If you are using a released version of Kubernetes, you should
19-
refer to the docs that go with that version.
20-
21-
<!-- TAG RELEASE_LINK, added by the munger automatically -->
22-
<strong>
23-
The latest release of this document can be found
24-
[here](http://releases.k8s.io/release-1.4/docs/README.md).
25-
26-
Documentation for other releases can be found at
27-
[releases.k8s.io](http://releases.k8s.io).
28-
</strong>
29-
--
30-
31-
<!-- END STRIP_FOR_RELEASE -->
32-
33-
<!-- END MUNGE: UNVERSIONED_WARNING -->
34-
351
# Kubernetes Documentation: releases.k8s.io/HEAD
362

373
* The [User's guide](user-guide/README.md) is for anyone who wants to run programs and

docs/admin/README.md

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,3 @@
1-
<!-- BEGIN MUNGE: UNVERSIONED_WARNING -->
2-
3-
<!-- BEGIN STRIP_FOR_RELEASE -->
4-
5-
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
6-
width="25" height="25">
7-
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
8-
width="25" height="25">
9-
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
10-
width="25" height="25">
11-
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
12-
width="25" height="25">
13-
<img src="http://kubernetes.io/kubernetes/img/warning.png" alt="WARNING"
14-
width="25" height="25">
15-
16-
<h2>PLEASE NOTE: This document applies to the HEAD of the source tree</h2>
17-
18-
If you are using a released version of Kubernetes, you should
19-
refer to the docs that go with that version.
20-
21-
<!-- TAG RELEASE_LINK, added by the munger automatically -->
22-
<strong>
23-
The latest release of this document can be found
24-
[here](http://releases.k8s.io/release-1.4/docs/admin/README.md).
25-
26-
Documentation for other releases can be found at
27-
[releases.k8s.io](http://releases.k8s.io).
28-
</strong>
29-
--
30-
31-
<!-- END STRIP_FOR_RELEASE -->
32-
33-
<!-- END MUNGE: UNVERSIONED_WARNING -->
34-
351
This file has moved to: http://kubernetes.github.io/docs/admin/
362

373

0 commit comments

Comments
 (0)