Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions hack/scripts/gen-ver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ if [ -z "$srcdir" ]; then
fi

version=$(git -C "${srcdir}" describe --match 'v[0-9]*' --always --tags)
version=${version#v}
commit="$(git --git-dir "${srcdir}/.git" rev-parse HEAD)"
commitShort=${commit:0:7}

Expand Down Expand Up @@ -71,8 +72,8 @@ if [[ "$NIGHTLY_BUILD" == "1" ]] || [[ "$version" == *-dev ]] || [[ -z "$(git -C
gitUnix="$(git --git-dir "${srcdir}/.git" log -1 --pretty='%ct')"
gitDate="$(TZ=UTC date -u --date "@$gitUnix" +'%Y%m%d%H%M%S')"
# generated version is now something like 'v0.0.0-20180719213702-cd5e2db'
version="v0.0.0-${gitDate}-${commitShort}" # (using hyphens)
pkgVersion="v0.0.0~${gitDate}.${commitShort}" # (using tilde and periods)
version="0.0.0-${gitDate}-${commitShort}" # (using hyphens)
pkgVersion="0.0.0~${gitDate}.${commitShort}" # (using tilde and periods)
rpmRelease=0
fi

Expand Down