Better scary message

This commit is contained in:
Tim Hockin
2015-07-16 10:02:26 -07:00
parent b2dafdaef5
commit 542e13d2d3
230 changed files with 4834 additions and 2532 deletions

View File

@@ -16,28 +16,40 @@ limitations under the License.
package main
import "fmt"
const unversionedWarningTag = "UNVERSIONED_WARNING"
var beginUnversionedWarning = beginMungeTag(unversionedWarningTag)
var endUnversionedWarning = endMungeTag(unversionedWarningTag)
const unversionedWarning = `
const unversionedWarningFmt = `
<!-- BEGIN STRIP_FOR_RELEASE -->
![WARNING](http://kubernetes.io/img/warning.png)
![WARNING](http://kubernetes.io/img/warning.png)
![WARNING](http://kubernetes.io/img/warning.png)
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
width="25" height="25">
<h1>PLEASE NOTE: This document applies to the HEAD of the source
tree only. If you are using a released version of Kubernetes, you almost
certainly want the docs that go with that version.</h1>
<h2>PLEASE NOTE: This document applies to the HEAD of the source tree</h2>
<strong>Documentation for specific releases can be found at
[releases.k8s.io](http://releases.k8s.io).</strong>
If you are using a released version of Kubernetes, you should
refer to the docs that go with that version.
![WARNING](http://kubernetes.io/img/warning.png)
![WARNING](http://kubernetes.io/img/warning.png)
![WARNING](http://kubernetes.io/img/warning.png)
<strong>
The latest 1.0.x release of this document can be found
[here](http://releases.k8s.io/release-1.0/%s).
Documentation for other releases can be found at
[releases.k8s.io](http://releases.k8s.io).
</strong>
--
<!-- END STRIP_FOR_RELEASE -->
`
@@ -52,5 +64,5 @@ func updateUnversionedWarning(file string, markdown []byte) ([]byte, error) {
if !hasMacroBlock(lines, beginUnversionedWarning, endUnversionedWarning) {
lines = append([]string{beginUnversionedWarning, endUnversionedWarning}, lines...)
}
return updateMacroBlock(lines, beginUnversionedWarning, endUnversionedWarning, unversionedWarning)
return updateMacroBlock(lines, beginUnversionedWarning, endUnversionedWarning, fmt.Sprintf(unversionedWarningFmt, file))
}