Add (and later strip) a nice warning at the top of README.md about it being auto-generated

This commit is contained in:
Tianon Gravi 2017-03-10 14:00:34 -08:00
parent e81b98fe79
commit 7057ad9690
2 changed files with 19 additions and 0 deletions

View File

@ -1,3 +1,19 @@
<!--
********************************************************************************
WARNING:
DO NOT EDIT "%%REPO%%/README.md"
IT IS AUTO-GENERATED
(from the other files in "%%REPO%%/" combined with a set of templates)
********************************************************************************
-->
# Supported tags and respective `Dockerfile` links
%%TAGS%%

View File

@ -60,6 +60,9 @@ sub prompt_for_edit {
my $proposedText = slurp $proposedFile or warn 'missing ' . $proposedFile;
$proposedText = trim(decode('UTF-8', $proposedText));
# remove our warning about generated files (Hub doesn't support HTML comments in Markdown)
$proposedText =~ s% ^ <!-- .*? --> \s* %%sx;
if ($lengthLimit > 0 && length($proposedText) > $lengthLimit) {
# TODO https://github.com/docker/hub-beta-feedback/issues/238
my $fullUrl = "$githubBase/$proposedFile";