diff options
Diffstat (limited to '_plugins')
-rw-r--r-- | _plugins/linter.rb | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/_plugins/linter.rb b/_plugins/linter.rb index aa55c8c..4db2b5f 100644 --- a/_plugins/linter.rb +++ b/_plugins/linter.rb @@ -120,17 +120,24 @@ module Jekyll end end + @@first_build = true def assert_git_annex(site) url = site.config['url'] stdout = `git annex find --not --in web` if stdout != '' or not $?.success? then puts 'Files in Git Annex not published to "web" remote:' puts stdout - puts 'Add them with:' - stdout.strip.split('\n').each do |file| - puts " git annex addurl --file #{file} #{url}/#{file}" + puts "Add them with:\n\n" + stdout.strip.split("\n").each do |file| + puts "git annex addurl --file #{file} #{url}/#{file}" + end + msg = "\nBuild again after files above are added" + if @@first_build then + @@first_build = false + puts msg + else + raise msg end - raise 'Build again after files above are added' end end |