mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat(CI): print text what went wrong when README CI fails
This commit is contained in:
parent
7c9ffe9e19
commit
47b45ff883
1 changed files with 6 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue