Skip to content

Release checklist

Frank Emrich edited this page Sep 21, 2020 · 24 revisions

NOTE: Since the move to jbuilder/Dune, the release checklist has changed. New one below!

First-time setup

Fork and clone https://github.com/ocaml/opam-repository one directory above the Links repository. So for example, if you have Links checked out at /home/simon/links, you should also have /home/simon/opam-repository.

Things to note

Our release pipeline is slightly non-standard since we release three packages: links, links-sqlite3, and links-postgresql. All of these must be released at the same time, since the DB drivers depend on links.

All have the same binary package (but different opam configurations, so the different packages install different things).

The release pipeline is therefore set up to tag and release links on GitHub, and then generate opam packages for all three packages which use the same release artifact. This is done using some Makefile magic since it's not officially supported by the dune-release tool.

Release Pipeline

The new release pipeline uses dune-release. Everything should be set up such that you can just do the following release pipeline:

From your links fork:

  1. Do the Pre-release sanity checking
  2. Update CHANGES.md with the new version. Please follow the existing format exactly.
  3. dune-release tag, which will extract the version number out of CHANGES.md and create a new tag
  4. Make sure that github has your ssh public key. If ssh -T [email protected] fails, go to https://github.com/settings/keys and add your public key.
  5. dune-release distrib, which will build the archive (the linter will fail on the doc field -- this can safely be ignored)
  6. dune-release publish distrib, which will push the release to GitHub
    • If it is your first time publishing, when you might need to instruct dune-release to use your GitHub username, i.e. dune-release config set user "<Github username>". You may need to do mkdir -p ~/.config/dune beforehand.
  7. cd to ../opam-repository, run git checkout -b links-release-VERSION, replacing VERSION with the version you're releasing, then cd back to links
  8. make opam-pkg, which will create opam packages and copy them to your repository
  9. cd to ../opam-repository, git commit and git push
  10. Create a pull request to opam-repository on GitHub with your new branch, and hope for the best with the CI
  11. Bump version number in basicsettings.ml (REPL header)
  12. Celebrate!

Troubleshooting

(Please update this with any issues you find. Thanks!)

warning 41: Some packages are mentioned in package scripts of features, but there is no dependency or depopt toward them: "links"

No idea how to fix this; it seems benign anyway, so safe to ignore unless the opam maintainers want it fixed.

Stack overflow during publish stage

For some reason, odoc doesn't like our codebase at the moment. My guess is the outdated preprocessing stuff. In any case, at the moment ensure you're running dune-release publish distrib instead of just dune-release publish.

"No package delegate found"

Ensure that the homepage field is set to a GitHub URL.

Some other error

Take a deep breath, have a stiff drink, and prepare for an adventure.