# dev/prerelease, output a version number based on the git log for
# the current working directory.
if [[ -n "$ARVADOS_BUILDING_VERSION" ]]; then
- echo "$ARVADOS_BUILDING_VERSION"
- return
- fi
-
- local git_ts git_hash prefix
- if [[ -n "$1" ]] ; then
- prefix="$1"
- else
- prefix="0.1"
+ local git_ts git_hash prefix
+ declare $(format_last_commit_here "git_ts=%ct")
+ echo "$ARVADOS_BUILDING_VERSION.$(date -ud "@$git_ts" +%Y%m%d%H%M%S)"
+ return
fi
- declare $(format_last_commit_here "git_ts=%ct")
- echo "${prefix}.$(date -ud "@$git_ts" +%Y%m%d%H%M%S)"
}
nohash_version_from_git() {