gen_version.sh 257 B

123456789101112131415
  1. #!/bin/sh
  2. set -e
  3. [ "$1" = "" ] && {
  4. echo "I need the dune-project version as arg" 1>&2
  5. exit 1
  6. }
  7. [ "$GIT_SHA" = "" ] && GIT_SHA="$(git log -1 --format="%h")"
  8. cat <<EOF
  9. (* generated by $0 *)
  10. let dune_project_version = "$1"
  11. let git_sha = "$GIT_SHA"
  12. EOF