1{ stdenv, writeScript, coreutils, glibc, git, openssh, gnused, mkdocs
2, python3, generatedOptions }:
7 repo = "git@github.com:input-output-hk/haskell.nix.git";
8 sshKey = "/run/keys/buildkite-haskell-dot-nix-ssh-private";
9 # Doesn't work with Python 2 in 20.03, fixed in master in https://github.com/NixOS/nixpkgs/commit/ee17a6a8379ffd791309b13143d76431f2f671df
10 py3mkdocs = mkdocs.override { python = python3; };
12 # update-docs depends on glibc which doesn't build on darwin
13 meta.addMetaAttrs { platforms = platforms.linux; } (writeScript "update-docs.sh" ''
18 export PATH="${makeBinPath [ coreutils glibc git openssh gnused py3mkdocs ]}"
22 rev=$(git rev-parse --short HEAD)
23 cd $(git rev-parse --show-toplevel)
25 echo "Preprocessing..."
26 cat docs/reference/modules-preamble.md ${generatedOptions} |
27 sed -e "s,$PWD/\?,," > docs/reference/modules.md
33 sed -i -e '/Build Date/d' site/index.html
34 sed -i -e '/lastmod/d' site/sitemap.xml
35 rm -f site/sitemap.xml.gz
36 rm docs/reference/modules.md
38 echo "Updating git index..."
41 git reset --hard origin/gh-pages
42 GIT_WORK_TREE=$(pwd)/site git add -A
44 echo "Committing changes..."
45 git commit --no-gpg-sign --message "Update gh-pages for $rev"
49 if [ "''${BUILDKITE_BRANCH:-}" = master ]; then
50 git push ${repo} HEAD:gh-pages
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list