-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
107 lines (78 loc) · 3.38 KB
/
README
File metadata and controls
107 lines (78 loc) · 3.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
Tested with OCaml 4.02.1.
Below is the Eliom default readme, it explains their custom build system.
Maybe we should switch to cmake.
Hacking syncgit
---------------
Some python code to generate post requests
import json
import requests
url = "http://localhost:8080/hackEns/PassPartout"
r = requests.post(url, data=json.dumps({"repository":{"name":"PassPartout","git_http_url":"https://git.eleves.ens.fr/hackens/PassManager.git"}}))
# then you can see the server answer, for instance in r.content
Install the required module, with opam: ocsigenserver, eliom, config-file, yojson
GitLab docs
-----------
Available for every gitlab instance, but you can quickly see
it at https://git.eleves.ens.fr/help/web_hooks/web_hooks.
Tricks to compile ocaml code
----------------------------
To use Lwt, Thread, and Unix together:
ocamlfind ocamlc -package lwt -thread unix.cma threads.cma bigarray.cma lwt.cma lwt-unix.cma syncgitcore.ml syncgitpush.ml
Issues
------
Only sync the master branch of every git repository at this moment.
Instructions
============
This project is (initially) generated by eliom-distillery as the basic
project "syncgit".
Generally, you can compile it and run ocsigenserver on it by
$ make test.byte (or test.opt)
See below for other useful targets for make.
Generated files
---------------
The following files in this directory have been generated by
eliom-distillery:
- syncgit.eliom
This is your initial source file.
All Eliom files (*.eliom, *.eliomi) in this directory are
automatically considered. To add a .ml/.mli file to your project,
append it to the variable SERVER_FILES or CLIENT_FILES.
- static/
The content of this folder is statically served. Put your CSS or
additional JavaScript files here!
- Makefile.options
Configure your project here!
- syncgit.conf.in
This file is a template for the configuration file for
ocsigenserver. You will rarely have to edit itself - it takes its
variables from the Makefile.options. This way, the installation
rules and the configuration files are synchronized with respect to
the different folders.
- Makefile
This contains all rules necessary to build, test, and run your
Eliom application. You better don't touch it ;) See below for the
relevant targets.
- local/
This directory is the target of the temporary installation of
your application, to test locally before doing a system-wide
installation in /. Do not put anything manually here.
- README
Not completely describable here.
Makefile targets
----------------
Here's some help on how to work with this basic distillery project:
- Test your application by compiling it and running ocsigenserver locally
$ make test.byte (or test.opt)
- Compile it only
$ make all (or byte or opt)
- Deploy your project on your system
$ sudo make install (or install.byte or install.opt)
- Run the server on the deployed project
$ sudo make run.byte (or run.opt)
If WWWUSER in the Makefile.options is you, you don't need the
`sudo'. If Eliom isn't installed globally, however, you need to
re-export some environment variables to make this work:
$ sudo PATH=$PATH OCAMLPATH=$OCAMLPATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH make run.byte/run.opt
- If you need a findlib package in your project, add it to the
variables SERVER_PACKAGES and/or CLIENT_PACKAGES. The configuration
file will be automatically updated.