diff --git a/.gitHEAD b/.gitHEAD new file mode 120000 index 000000000..85273d468 --- /dev/null +++ b/.gitHEAD @@ -0,0 +1 @@ +.git/HEAD \ No newline at end of file diff --git a/.gitignore b/.gitignore index 46d12ff04..14e1f3c03 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ _build/* *~ .merlin */.merlin -*.install \ No newline at end of file +*.install +/Version.ml diff --git a/Version.ml b/Version.ml deleted file mode 100644 index 6eaa2c0d0..000000000 --- a/Version.ml +++ /dev/null @@ -1 +0,0 @@ -let version = "7445e9c0" diff --git a/dune b/dune index a0aa8eec8..8afa14ac1 100644 --- a/dune +++ b/dune @@ -41,13 +41,14 @@ ) (rule - (targets vera) - (deps hd) - (action (run "sh" "-c" "if git symbolic-ref HEAD; then ln -s ../../.git/\"$(git symbolic-ref HEAD)\" vera; else ln -s hd vera; fi")) + (targets Version.gitHEAD) + (deps .gitHEAD) + (action (run "sh" "-c" "if git symbolic-ref HEAD; then ln -s ../../.git/\"$(git symbolic-ref HEAD)\" Version.gitHEAD; else ln -s hd Version.gitHEAD; fi")) ) (rule - (targets verb) - (deps vera) - (action (run "sh" "-c" "cat vera > verb")) + (targets Version.ml) + (deps Version.gitHEAD) + (action (run "sh" "-c" "printf 'let version = \"%s\"'\\\\n \"$(cat Version.gitHEAD)\" > Version.ml")) + (mode promote-until-clean) )