diff --git a/Makefile b/Makefile index 2dbcbface..0dc127e75 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ exclude_files := config/database.yml \ *.o \ *.a -version = $(shell git describe --tags --exact 2>/dev/null || { git describe --tags | sed -E 's/-([0-9]+)-[^-]*$$/+\1/'; }) +version = $(shell ./ci/gen_version.sh) debian_version = $(shell echo $(version) | sed 's/_/~/' | sed 's/-master/~master/' | sed 's/-rc/~rc/')-1 commit = $(shell git rev-parse HEAD) diff --git a/ci/gen_version.sh b/ci/gen_version.sh new file mode 100755 index 000000000..eec78878f --- /dev/null +++ b/ci/gen_version.sh @@ -0,0 +1,6 @@ +#!/bin/bash +if git describe --tags --exact &>/dev/null; then + git describe --tags --exact | sed 's/$/+nightly0/' +else + git describe --tags | sed -E 's/-([0-9]+)-[^-]*$/+nightly\1/' +fi