-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.t
54 lines (41 loc) · 1.37 KB
/
run.t
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
Create an empty config to avoid searching into the runner environments file system
$ mkdir .nomad && echo "()" > .nomad/config.sexp
Initialize new project
$ nomad new --bin new_project | grep -o "Initiate project"
Initiate project
CD into the new project
$ cd new_project
Create a light-weight dune-project file
$ mkdir .nomad
$ echo '((dune_project ./nomad/custom-dune-project.sexp) (dev_packages ()))' > .nomad/config.sexp
$ nomad config
((author "Author Name") (username github-username)
(dune_project ./nomad/custom-dune-project.sexp) (dev_packages ()))
$ cat <<EOF > .nomad/custom-dune-proj.sexp
> (lang dune 2.9)
> (name \$(NAME))
> (license MIT)
> (authors "\$(AUTHOR)")
> (maintainers "\$(AUTHOR)")
> (source (github \$(USERNAME)/\$(NAME)))
> (package
> (name $name)
> (synopsis "Short description")
> (description "Longer description")
> (depends
> (dune (> 2.9))
> ocaml
> ))
> EOF
Can sync the dependencies
$ nomad sync | grep -o Done.
Done.
Done.
Add an unmet library dependency
$ echo "(library (name new_project) (libraries curly))" > lib/dune
$ nomad add curly
We should be able to sync it, despite the initial dune build failing due to the missing
library dependency
$ nomad sync | grep -o Done.
nomad: [WARNING] dune build failed with unfound library, nomad will now update dependecies
Done.