~maelkum/viuavm

71f39131775d706ff226f8f363772b210c9871f5 — Marek Marecki 17 days ago 8a0aaba
Change version-making script

The third part of the version is the number of commits since the version
was tagged.
2 files changed, 7 insertions(+), 3 deletions(-)

M VERSION
M new/scripts/make_version.sh
M VERSION => VERSION +1 -1
@@ 1,1 1,1 @@
0.12.1
0.12

M new/scripts/make_version.sh => new/scripts/make_version.sh +6 -2
@@ 1,7 1,8 @@
#!/usr/bin/env bash

VERSION=$(cat $(git rev-parse --show-toplevel)/VERSION)
COMMITS_SINCE=$(git log --oneline v${VERSION}..HEAD | wc -l)
TAG="v${VERSION}.0"
COMMITS_SINCE=$(git log --oneline ${TAG}..HEAD | wc -l)

GIT_HEAD=$(git rev-parse HEAD)
GIT_DIRTY=''


@@ 25,7 26,10 @@ case ${MODE} in
    fingerprint|fp)
        echo "${FINGERPRINT}"
        ;;
    base)
        echo "${VERSION}.0"
        ;;
    *)
        echo "${VERSION}"
        echo "${VERSION}.${COMMITS_SINCE}"
        ;;
esac