Commit e5340607 authored by Ben Gamari's avatar Ben Gamari 🐢

Refactor check

parent 76fe48e5
......@@ -33,9 +33,7 @@ build:
echo "==============================="
echo "Link Check:"
echo "==============================="
nix run -f . -c ghc-homepage server &
nix run -f . -c check.sh
kill %1
- nix-store --export $(nix-store -qR --include-outputs $(nix-instantiate --quiet .)) > store.nar
cache:
policy: pull-push
......
......@@ -2,7 +2,14 @@
set -e
( ghc-homepage serve || ( echo "serve failed"; exit 1 ) ) &
# docs/ seems to be a URL rewrite rule provided by haskell.org
# dist/mac_frameworks appears to be lost to history
linkchecker http://localhost:8000 --ignore-url 'docs/' --ignore-url=dist/mac_frameworks
linkchecker http://localhost:8000 \
--ignore-url 'docs/' \
--ignore-url=dist/mac_frameworks \
|| ( kill %1; exit 1 )
kill %1
......@@ -11,8 +11,10 @@ let
src = nix-gitignore.gitignoreSource [] ./.;
installPhase = ''
mkdir -p $out/bin
substitute check.sh $out/bin/check.sh --replace linkchecker ${linkchecker}/bin/linkchecker
install check.sh $out/bin
chmod ugo+rx $out/bin/check.sh
makeWrapper ${hs}/bin/check.sh $out/bin/check.sh \
--append PATH : ${linkchecker}/bin:$out/bin
makeWrapper ${hs}/bin/ghc-homepage $out/bin/ghc-homepage \
--set LOCALE_ARCHIVE "${glibcLocales}/lib/locale/locale-archive" \
--set LANG en_US.UTF-8
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment