summaryrefslogtreecommitdiff
path: root/scripts/update-readme.lua
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2020-08-25 15:06:30 +0200
committerThomas Vigouroux <39092278+vigoux@users.noreply.github.com>2020-08-25 15:22:15 +0200
commit47b45ff8835d948bcdbe18486fe06ebb29649fb8 (patch)
treee0a08db0d15a7b8a519fc3c856d3f5038ba9045d /scripts/update-readme.lua
parent7c9ffe9e190cd954dc56fac74d5bf80448cb4b8c (diff)
feat(CI): print text what went wrong when README CI fails
Diffstat (limited to 'scripts/update-readme.lua')
-rwxr-xr-xscripts/update-readme.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/update-readme.lua b/scripts/update-readme.lua
index 8cc91f86..2a4860c4 100755
--- a/scripts/update-readme.lua
+++ b/scripts/update-readme.lua
@@ -32,7 +32,13 @@ local new_readme_text = string.gsub(readme_text, "<!%-%-parserinfo%-%->.*<!%-%-p
vim.fn.writefile(vim.fn.split(new_readme_text, '\n'), "README.md")
if string.find(readme_text, generated_text, 1, 'plain') then
+ print("README.md is up-to-date!")
vim.cmd('q')
else
+ print("New README.md was written. Please commit that change! Old text was: ")
+ print(string.sub(readme_text, string.find(readme_text, "<!%-%-parserinfo%-%->.*<!%-%-parserinfo%-%->")))
+ print("\n")
+ print('If you see this on CI, please run `nvim --headless -c "luafile ./scripts/update-readme.lua"` '
+ ..'locally and commit the changes!')
vim.cmd('cq')
end