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

pre-push v2

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