You need Opam, you can install it by following Opam's documentation.
With Opam installed, you can install the dependencies with:
make dev
Then, build the project with:
make build
After building the project, you can run the main binary that is produced.
make start
You can run the test compiled executable:
make test
Documentation for the libraries in the project can be generated with:
make doc
open-cli $(make doc-path)
This assumes you have a command like open-cli installed on your system.
NOTE: On macOS, you can use the system command
open
, for instanceopen $(make doc-path)
To create a release and publish it on Opam, first update the CHANGES.md
file with the last changes and the version that you want to release.
The, you can run the script script/release.sh
. The script will perform the following actions:
- Create a tag with the version found in
omigrate.opam
, and push it to your repository. - Create the distribution archive.
- Publish the distribution archive to a Github Release.
- Submit a PR on Opam's repository.
When the release is published on Github, the CI/CD will trigger the Release
workflow which will perform the following actions
- Compile binaries for all supported platforms.
- Create an NPM release containing the pre-built binaries.
- Publish the NPM release to the registry.
The following snippet describes OCaml Migrate's repository structure.
.
├── .github/
| Contains Github specific files such as actions definitions and issue templates.
│
├── bin/
| Source for OCaml Migrate's binary. This links to the library defined in `lib/`.
│
├── lib/
| Source for OCaml Migrate's library. Contains OCaml Migrate's core functionnalities.
│
├── test/
| Unit tests and integration tests for OCaml Migrate.
│
├── dune-project
| Dune file used to mark the root of the project and define project-wide parameters.
| For the documentation of the syntax, see https://dune.readthedocs.io/en/stable/dune-files.html#dune-project
│
├── LICENSE
│
├── Makefile
| Make file containing common development command.
│
├── README.md
│
└── omigrate.opam
Opam package definition.
To know more about creating and publishing opam packages, see https://opam.ocaml.org/doc/Packaging.html.