summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2017-12-21 15:23:49 +0100
committerGitHub <noreply@github.com>2017-12-21 15:23:49 +0100
commitc29b344ceba1214548a194d885a1d3f2e819784e (patch)
treee18ef69947a2cd282a1aef3a26665da89020c22b
parentd011b17eec0f55b7af6603aab94e31003a438496 (diff)
downloadhakyll-c29b344ceba1214548a194d885a1d3f2e819784e.tar.gz
Cabalize website
-rw-r--r--.circleci/config.yml2
-rwxr-xr-x.circleci/tickle.sh2
-rw-r--r--hakyll.cabal46
-rw-r--r--stack.yaml1
4 files changed, 39 insertions, 12 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 8aaf463..4bbc884 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -14,7 +14,7 @@ jobs:
# We set jobs to 1 here because that prevents Out-Of-Memory exceptions
# while compiling dependencies.
name: 'Install dependencies'
- command: '.circleci/tickle.sh cabal install --only-dependencies --enable-tests --jobs=1'
+ command: '.circleci/tickle.sh cabal install --only-dependencies --enable-tests --jobs=1 --flags="+buildWebsite"'
- run:
name: 'Build and run tests'
command: 'cabal test'
diff --git a/.circleci/tickle.sh b/.circleci/tickle.sh
index 5071bb4..195c29c 100755
--- a/.circleci/tickle.sh
+++ b/.circleci/tickle.sh
@@ -3,7 +3,7 @@ set -o nounset -o errexit -o pipefail
function tickle() {
while [ true ]; do
- echo "[$(date +%H:%M:%S)"] Tickling...
+ echo "[$(date +%H:%M:%S)] Tickling..."
sleep 60
done
}
diff --git a/hakyll.cabal b/hakyll.cabal
index 93a8b00..b19bbb8 100644
--- a/hakyll.cabal
+++ b/hakyll.cabal
@@ -37,7 +37,7 @@ License: BSD3
License-File: LICENSE
Category: Web
-Cabal-Version: >= 1.8
+Cabal-Version: >= 1.10
Build-Type: Simple
Data-Dir: data
@@ -94,9 +94,15 @@ Flag checkExternal
Description: Include external link checking
Default: True
+Flag buildWebsite
+ Description: Build the hakyll website
+ Default: False
+ Manual: True
+
Library
- Ghc-Options: -Wall
- Hs-Source-Dirs: lib
+ Ghc-Options: -Wall
+ Hs-Source-Dirs: lib
+ Default-language: Haskell2010
Exposed-Modules:
Hakyll
@@ -217,10 +223,11 @@ Library
-DCHECK_EXTERNAL
Test-suite hakyll-tests
- Type: exitcode-stdio-1.0
- Hs-source-dirs: tests
- Main-is: TestSuite.hs
- Ghc-options: -Wall
+ Type: exitcode-stdio-1.0
+ Hs-source-dirs: tests
+ Main-is: TestSuite.hs
+ Ghc-options: -Wall
+ Default-language: Haskell2010
Other-modules:
Hakyll.Core.Dependencies.Tests
@@ -307,9 +314,10 @@ Test-suite hakyll-tests
-DCHECK_EXTERNAL
Executable hakyll-init
- Ghc-options: -Wall
- Hs-source-dirs: src
- Main-is: Init.hs
+ Main-is: Init.hs
+ Ghc-options: -Wall
+ Hs-source-dirs: src
+ Default-language: Haskell2010
Other-modules:
Paths_hakyll
@@ -319,3 +327,21 @@ Executable hakyll-init
base >= 4 && < 5,
directory >= 1.0 && < 1.4,
filepath >= 1.0 && < 1.5
+
+Executable hakyll-website
+ Main-is: site.hs
+ Ghc-options: -Wall
+ Hs-source-dirs: web
+ Default-language: Haskell2010
+
+ If flag(buildWebsite)
+ Buildable: True
+ Else
+ Buildable: False
+
+ Build-depends:
+ hakyll,
+ base >= 4 && < 5,
+ directory >= 1.0 && < 1.4,
+ filepath >= 1.0 && < 1.5,
+ pandoc >= 2.0.5 && < 2.1
diff --git a/stack.yaml b/stack.yaml
index ac7a6f6..36d35e4 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -6,6 +6,7 @@ flags:
previewServer: True
watchServer: True
checkExternal: True
+ buildWebsite: True
packages:
- '.'