Added 'make changes' target.

This copies to osx clipboard a github-markdown version of the
changes from the latest release in the changelog.
This commit is contained in:
John MacFarlane 2015-11-15 08:17:09 -08:00
parent 9ebd601d89
commit 07e1234c3b
2 changed files with 13 additions and 1 deletions

View file

@ -23,6 +23,9 @@ test:
bench:
cabal bench
changes:
pandoc --filter extract-changes.hs changelog -t markdown_github | pbcopy
install: full
cabal copy
cabal register
@ -58,4 +61,4 @@ download_stats:
clean:
cabal clean
.PHONY: deps quick full install clean test bench osxpkg dist prof download_stats
.PHONY: deps quick full install clean test bench changes osxpkg dist prof download_stats

9
extract-changes.hs Normal file
View file

@ -0,0 +1,9 @@
-- Extract changes from latest version in changelog.
import Text.Pandoc.JSON
main = toJSONFilter extractFirst
extractFirst :: Pandoc -> Pandoc
extractFirst (Pandoc meta (Para{} : BulletList bs : _)) =
Pandoc meta [BulletList bs]
extractFirst x = x