1
Fork 0

update website build script

This commit is contained in:
Jake Wheat 2019-08-31 16:48:51 +01:00
parent 2ab4c08a7e
commit 7e38efc0bf

View file

@ -5,20 +5,24 @@ set -ex
# todo: check this is run from the project root and not the website/ # todo: check this is run from the project root and not the website/
# dir # dir
# todo: put all this in the makefile?
# use make build to get the package database into the right state first
mkdir -p build mkdir -p build
cp website/main.css build cp website/main.css build
cp website/ocean.css build cp website/ocean.css build
# index # index
asciidoctor website/index.asciidoc -o - | runhaskell website/AddLinks.lhs > build/index.html asciidoctor website/index.asciidoc -o - | cabal exec runhaskell website/AddLinks.lhs > build/index.html
asciidoctor website/supported_sql.asciidoc -o - | runhaskell website/AddLinks.lhs > build/supported_sql.html asciidoctor website/supported_sql.asciidoc -o - | cabal exec runhaskell website/AddLinks.lhs > build/supported_sql.html
# tpch sql file # tpch sql file
# pandoc src/tpch.sql -s --highlight-style kate -o tpch.sql.html # pandoc src/tpch.sql -s --highlight-style kate -o tpch.sql.html
# rendered test cases # rendered test cases
# build the parserexe target first to fix the package database # build the parserexe target first to fix the package database
runhaskell -itools website/RenderTestCases.lhs > build/test_cases.asciidoc cabal exec runhaskell -- --ghc-arg=-package=pretty-show -itools website/RenderTestCases.lhs > build/test_cases.asciidoc
asciidoctor build/test_cases.asciidoc -o - | \ asciidoctor build/test_cases.asciidoc -o - | \
sed -e "s/max-width:62\.5em//g" \ sed -e "s/max-width:62\.5em//g" \
@ -33,4 +37,8 @@ rm build/test_cases.asciidoc
cabal v2-haddock cabal v2-haddock
rm -Rf build/haddock rm -Rf build/haddock
mkdir build/haddock/ mkdir build/haddock/
cp -R dist-newstyle/build/x86_64-linux/ghc-8.6.5/simple-sql-parser-0.5.0/doc/html/simple-sql-parser/* build/haddock/
GHC_VER=$(ghc --numeric-version)
cp -R dist-newstyle/build/x86_64-linux/ghc-$GHC_VER/simple-sql-parser-0.6.0/doc/html/simple-sql-parser/* build/haddock/