[OCaml] High Intensity Training Online
1
#!
2
# hito pre-receive hook. The bare repository runs this hook before it moves a
3
# ref. The hook checks each candidate master revision in an isolated directory.
4
# A failed check rejects the push, so an unverified revision cannot deploy.
5
#
6
# deploy/setup.sh installs this hook and its trusted hito-ci helper. The helper
7
# is outside the received tree. A pushed revision cannot weaken this check.
8
#
9
# Style: Google Shell Style Guide.
10
11
set-euopipefail
12
13
readonlyDEPLOY_BRANCH="master"
14
readonlyBARE="/srv/git/hito.git"
15
readonlySHARED="/srv/hito/shared"
16
readonlyCI_HELPER="${BARE}/hooks/hito-ci"
17
readonlyZERO="0000000000000000000000000000000000000000"
18
19
exportOPAMROOT="/srv/git/.opam"
20
exportOPAMSWITCH="${SHARED}"
21
22
err(){
23
printf'
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
''
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77