diff --git a/tools/get-marketplace-version.sh b/tools/get-marketplace-version.sh index 46b9823ff..0bc5d379a 100755 --- a/tools/get-marketplace-version.sh +++ b/tools/get-marketplace-version.sh @@ -9,11 +9,10 @@ # we opted for number of seconds passed between last tag and last commit. This # should generate 0 for tagged commits and other numbers for pull requests. set -Ee -#LAST_TAG=$(git describe --tags --abbrev=0) -#LAST_TAG_TIMESTAMP=$(git -P log -1 --format=%ct "${LAST_TAG}") -#LAST_COMMIT_TIMESTAMP=$(git -P show --no-patch --format=%ct HEAD) -#VERSION_SUFFIX="$((LAST_COMMIT_TIMESTAMP-LAST_TAG_TIMESTAMP))" +LAST_TAG=$(git describe --tags --abbrev=0) +LAST_TAG_TIMESTAMP=$(git -P log -1 --format=%ct "${LAST_TAG}") +LAST_COMMIT_TIMESTAMP=$(git -P show --no-patch --format=%ct HEAD) +VERSION_SUFFIX="$((LAST_COMMIT_TIMESTAMP-LAST_TAG_TIMESTAMP))" # We remove the last number from the node reported version. VERSION_PREFIX=$(node -p "require('./package.json').version") -VERSION_SUFFIX=3000000 echo -n "${VERSION_PREFIX%.*}.${VERSION_SUFFIX}"