makorel
December 15, 2014 ยท View on GitHub
makorel aims to make release of opam packages easier.
Last documentation update: 2014/07/01 (v0.2.2).
What can it do for me?
Initialize new opam files
makorel -i -v x.y.z [-p /path/to/package/]
Create a directory at /path/to/package/package.x.y.z/ and write
descr, opam and url files, pre-filled with every field they
may contain as comments.
If no -p /path/to/package/ is provided, makorel will use current
directory.
Update an existing package to another version
makorel -v x.y.z [-p /path/to/package/]
Copy information from lastest directory in /path/to/package/package.x.y.z
and substitute version number from urls, download archive at the resulting
address, and compute checksum of this file.
If no -p /path/to/package/ is provided, makorel will use current
directory.
Things you should know before using makorel
makorel assumes that there is consistency in your releases. That means:
- Releases follow the usual alphabetical order. If it is not the case, makorel might still act as expected, but it is not guaranted.
- New release will keep the same
descrandopamfiles than the latest previous one. You may want to edit these files after their generation. - The
urlfile is generated by:- Replacing the version number in the archive url(s).
- If
checksumfile is present in original file, downloading the main url file and generating newchecksumusingDigest. If no archive url is provided before the checksum field, this part will be skipped and no checksum will be generated.
How to install?
$ git clone https://github.com/sagotch/makorel.git
$ cd makorel
$ opam pin add makorel .
$ opam install makorel
Examples
Initializing a package:
$ pwd
/path/to/opam-repo-dev/packages/
$ ls
foo
$ makorel -i -p makorel -v 0.1.0
$ ls -R
.:
foo makorel
[...]
./makorel:
makorel.0.1.0
./makorel:
descr opam url
Updating a package to newer version. Here, you do not need [-p path]
because you are in the makorel package root directory:
$ pwd
/path/to/opam-repo-dev/packages/makorel/
$ ls
makorel.0.1.0
$ cat makorel.0.1.0/url
archive: "https://github.com/sagotch/makorel/archive/v0.1.0.tar.gz"
checksum: "c63672aea65d91d087aa86ba19b5f22b"
$ makorel -v 0.2.0
$ ls
makorel.0.1.0 makorel.0.2.0
$ cat makorel.0.2.0/url
archive: "https://github.com/sagotch/makorel/archive/v0.2.0.tar.gz"
checksum: "9ff7a6d5978148f963ec123c3d2db201"