-
Notifications
You must be signed in to change notification settings - Fork 43
Pre release sanity checking
While many of us work off git branches, a release needs to package Links and examples in such a way that they work for users who simply run "opam install links". As a result, we need to be careful to check that a release works before submitting it to OPAM.
Firstly, prepare the release according to https://github.com/links-lang/links/wiki/Release-checklist, but do not run opam publish.
Next, ensure all of the unit tests work by running "./run-tests".
Next, preferably on a clean OCaml environment, run (from the base Links source directory):
opam pin add links.opam .
This will pin the Links install to the current directory, and attempt to install it. First thing to check is that this succeeds.
Next, check that the Links REPL works by typing "linx", and evaluating a simple expression (for example, 2+2).
Next, you need to check the examples work. To do this (assuming a switch of 4.08.1 -- change this to the switch you're on), firstly navigate to your home directory then type:
cd .opam/4.08.1/share/links
linx -m --path=examples:examples/games:examples/dictionary examples/webserver/examples-nodb.links
If .opam/4.08.1/share/links
does not exist, you may have to use .opam/default/share/links
instead. This happens if the OCaml version you are using is the same as the one shipping with your OCaml distribution by default.
Navigate to "http://localhost:8080" and ensure that all of the non-DB examples work.
Finally, install the database and ensure that
linx -m --path=examples:examples/games:examples/dictionary examples/webserver/examples.links
runs correctly, including all of the database examples.
Note that the command above assumes that you have adapted the default configuration file used by linx
to reflect your database configuration.
To determine the path to this config file, you may run linx
and obtain the value of the config
setting from running @settings;
. For example, this may be /home/the_user/.opam/4.08.1/etc/links/config