git.iko.soy/typeable/postgresql-simple
on master help sign in
Automate source distribution

Just a quick-and-dirty shell script to automate some of the things that cabal sdist doesn't quite handle

commita36e15f9a022470dd6b4095a54c24001cf97f1d3 authorLeon P Smith <leon@melding-monads.com> dateWed 1 Jun 2016, 17:22 (10 years ago) parent297d2d6
1 file changed+25
sdist.sh+25
sdist.shnew file+25
@@ -0,0 +1,25 @@
1+#!/bin/bash
2+
3+echo "Generating CHANGELOG.md"
4+echo
5+
6+cat <<HEADER > CHANGELOG.md
7+For the full changelog, see
8+<https://github.com/lpsmith/postgresql-simple/blob/master/CHANGES.md>
9+
10+HEADER
11+
12+perl -ne '$n++ if /^###/; exit if $n==2; print' CHANGES.md >> CHANGELOG.md
13+
14+cat CHANGELOG.md
15+rm -f ./dist/*.tar
16+rm -f ./dist/*.tar.gz
17+cabal sdist
18+cd dist
19+wc *.tar.gz
20+gunzip *.gz
21+wc *.tar
22+zopfli *.tar
23+wc *.tar.gz
24+cd ..
25+rm -f ./dist/*.tar