Commit 568a1f51 authored by Christopher League's avatar Christopher League
Browse files

pre-push v2

parent a8beebca
......@@ -9,8 +9,8 @@ clean:
reallyclean: clean
$(RM) result
push:
$(MAKE) -C vm/www push
(cd vm/fonts; rm -f result; nix-build --no-out-link | cachix push liucs)
tar --create --xz --exclude=result --exclude='*.qcow2' vm |\
ssh liucs.net 'cat >! w/contrapunctus/_site/tmp/ligo/nixexprs.tar.xz'
.PHONY: default qemu clean reallyclean pre-push
pre-push:
$(MAKE) -C fonts push
$(MAKE) -C www push
#!/bin/sh
set -e
# $1 -- Name of the remote to which the push is being done
remote="$1"
# $2 -- URL to which the push is being done
......@@ -14,8 +16,15 @@ esac
# <local ref> <local sha1> <remote ref> <remote sha1>
while read local_ref local_sha remote_ref remote_sha
do
echo pre-push: from $local_ref $local_sha
echo pre-push: to $remote_ref $remote_sha
case $remote_ref in
refs/heads/master)
echo pre-push: preparing $local_sha
tree=$(PRINT_PATH=1 nix-prefetch-git --quiet $PWD $local_sha |tail -n1)
make -C $tree pre-push
;;
*)
echo pre-push: ignoring push to $remote_ref
esac
done
exit 1
exit 0
Supports Markdown
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