diff options
author | EuAndreh <eu@euandre.org> | 2020-12-27 22:04:10 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2020-12-27 22:04:10 -0300 |
commit | 56da1a73ac0c211fbb14447b9175660d6757e795 (patch) | |
tree | 64304b4fbe3f3fb3a6fedb68c338c5ae5b1c86e4 /_plugins | |
parent | TODOs.org: Add 7535169e-715e-409b-88c3-78c4bb482d95 (diff) | |
download | euandre.org-56da1a73ac0c211fbb14447b9175660d6757e795.tar.gz euandre.org-56da1a73ac0c211fbb14447b9175660d6757e795.tar.xz |
linter.rb: Add assert_git_annex
Diffstat (limited to '')
-rw-r--r-- | _plugins/linter.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/_plugins/linter.rb b/_plugins/linter.rb index 5281985..188aede 100644 --- a/_plugins/linter.rb +++ b/_plugins/linter.rb @@ -144,9 +144,24 @@ module Jekyll end end + 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}" + end + raise 'Build again after files above are added' + end + end + def generate(site) assert_unique_ids(site) assert_frontmatter(site) + assert_git_annex(site) end end end |