package opam-publish
Install
Dune Dependency
Authors
Maintainers
Sources
md5=1ed118cf985f418736c9a5cfd6be60cf
sha512=ba0014adae5e0fce5116d333c4839e8c70d309c6eab15aac47ab5527a7ee232d0cf4e80133d552a774305323512da83845fe03a2a48970d471ab383ecbf178bb
README.md.html
opam-publish
A tool to ease contributions to opam repositories.
opam-publish
takes package definition files of your projects, and submits them to opam package repositories (ocaml/opam-repository by default).
Prerequisites
This version is for opam 2.0 or higher, and should not be used with repositories in older formats. A Github account is required. opam repository is cloned over ssh, you need to have your ssh keys registered in your Github account.
Usage
Basic case, assuming your project is on Github
The same works for initial publications, new releases, and updates.
The following should be run from the source directory of your project
Make sure you have an
opam
file, orNAME.opam
files at the root of your projectCreate a tag:
git tag -a TAG; git push origin TAG
Run
opam publish
. This will install the tool if required.
You will be guided through the rest (creating a Github token the first time, reviewing the patch, etc.)
Additional possibilities
If your project is not on Github, you can specify the archive URL on the command-line.
If the opam files are not in the archive, or outdated, you can specify them on the command-line, or specify a directory where to look for them (e.g. opam publish URL .
).
Submitting to other repositories is possible, as long as they are on Github. See the --repo
option.
Updating already published packages using opam-publish is generally prohibited as it usually implies a change in the target archive via the git tag, which would break everyone trying to install the package. Please refer to opam-repository's documentation for more informations about how to update or fix packages.
See opam publish --help
for more options.