Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Christopher League
nixvm
Commits
568a1f51
Commit
568a1f51
authored
Dec 20, 2018
by
Christopher League
Browse files
pre-push v2
parent
a8beebca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
568a1f51
...
@@ -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
pre-push
View file @
568a1f51
#!/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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment