#!/bin/bash
F=veric/version.v
set -e
printf >$F 'Require Import Coq.Strings.String. Open Scope string.\n'
printf >>$F 'Definition git_rev := "'
git log -n 1 --pretty=format:"%H" >>$F || true
printf >>$F '".\n'
printf >>$F 'Definition release := "'
tr -d '[:cntrl:]' <VERSION >>$F
printf >>$F '".\n'
printf >>$F 'Definition date := "'
date --rfc-3339=date | tr -d '[:cntrl:]' >>$F
printf >>$F '".\n'
