Commit b4fdf177 authored by erwan's avatar erwan
Browse files

Build: track the Makefile.version so that src/lutlsVersion.ml can be regenerated each time

parent ddd25de0
......@@ -32,7 +32,11 @@ update_version:
rm -f src/lutilsVersion.ml
make src/lutilsVersion.ml
cp _oasis _oasis.save
ifneq (,$(findstring -,$(VERSION)))
echo "won't update _oasis"
else
cat _oasis.save | sed "s/^Version:.*/Version: $(VERSION)/" > _oasis
endif
rm -f committed
make clean && make
......
SHA:=$(shell git log -1 --pretty=format:"%h")
# Both work. Which one is the best?
VERSION=$(shell ./node_modules/.bin/git-latest-semver-tag)
VERSION=$(shell git describe --tags)
del_version:
rm -f src/lutilsVersion.ml
gen_version: del_version src/lutilsVersion.ml
src/lutilsVersion.ml:
echo "let str=\"$(VERSION)\"" > src/lutilsVersion.ml ; \
echo "let sha=\"$(SHA)\"" >> src/lutilsVersion.ml
\newcommand{\version}{1.48.4}
\newcommand{\sha}{d90fc9d}
\newcommand{\versionname}{none}
\newcommand{\versiondate}{28-01-19}
let str="1.48.4"
let sha="d90fc9d"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment