From: Basile Starynkevitch <basile@starynkevitch.net>
To: David CHEMOUIL <David.Chemouil@onera.fr>, caml-list@inria.fr
Subject: Re: [Caml-list] releasing and publishing an OCaml program
Date: Fri, 16 Oct 2015 21:29:48 +0200 [thread overview]
Message-ID: <5621502C.60607@starynkevitch.net> (raw)
In-Reply-To: <6f77545c62146e8d504a5117716d7d1f@sybille.onecert.fr>
On 10/16/2015 08:24 PM, David CHEMOUIL wrote:
> Hi,
>
> I am looking for a self-contained, to the point, documentation or
> tutorial detailing steps, or even commands and scripts to run in order
> to release and publish an OCaml-programmed piece of software.
>
> So common tasks we'd like to automate are quite simple: adding the
> commit number and/or a build number in the OCaml source code (e.g. to
> display it when running the program),
This is not specific to Ocaml. It is a matter of build process.
Assuming a Linux system, you might have some rule in your Makefile
similar to the (untested) one below:
ML_SOURCES=$(wildcard [a-z]*.ml)
ML_INTERFACES=$(wildcard [a-z]*.mli)
MD5SUM= md5sum
_timestamp.ml:
date +'let my_timestamp="%c";;' > _timestamp.tmp
(echo -n 'let my_lastgitcommit ="' ; \
git log --format=oneline --abbrev=12 --abbrev-commit -q \
| head -1 | tr -d '\n\r\f\"' ; \
echo '";;') >> _timestamp.tmp
(echo -n 'let my_checksum ="'; cat $(sort $(ML_SOURCES)) $(sort
$(ML_INTERFACES))| $(MD5SUM) | cut -d' ' -f1 | tr -d '\n\r\f\"\\' ; echo
'";') >> _timestamp.tmp
mv _timestamp.tmp _timestamp.ml
Cheers
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mine, sont seulement les miennes} ***
next prev parent reply other threads:[~2015-10-16 19:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-16 18:24 David CHEMOUIL
2015-10-16 19:29 ` Basile Starynkevitch [this message]
2015-10-17 7:22 ` Gabriel Scherer
2015-10-17 17:25 ` Ashish Agarwal
2015-10-17 19:42 ` ygrek
2015-10-19 8:50 ` Kenneth Adam Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5621502C.60607@starynkevitch.net \
--to=basile@starynkevitch.net \
--cc=David.Chemouil@onera.fr \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox