on e94de40 help sign in
haskell.nix/scripts/update-pins.nix
28 lines 625 B history raw
1{ stdenv, writeScript, coreutils, glibc, git, openssh }@args:
3with stdenv.lib;
5let
6 repo = "git@github.com:input-output-hk/haskell.nix.git";
7 sshKey = "/run/keys/buildkite-haskell-dot-nix-ssh-private";
8in
9 writeScript "update-pins.sh" ''
10 #!${stdenv.shell}
12 set -euo pipefail
14 export PATH="${makeBinPath [ coreutils glibc git openssh ]}"
16 source ${./git.env}
18 git add *.json
19 check_staged
20 echo "Committing changes..."
21 git commit --message "Update Hackage and Stackage"
23 use_ssh_key ${sshKey}
25 if [ "$BUILDKITE_BRANCH" = master ]; then
26 git push ${repo} HEAD:master
27 fi
28 ''