summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
28d0d70)
For some reason our version script removes the leading 'v' from the git
tag. This confuses some other tools such as Buildroot and is different
to most other projects, so include it again.
Additionally now that we have tagged releases just use git describe
rather than using a SHA and date to describe non-tag commits.
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
- if tag=$(git describe --tags --exact-match 2>/dev/null); then
- # use a tag; remove any 'v' prefix from v<VERSION> tags
- tag=${tag#v}
- version=$(printf "%s%s" ${tag} ${suffix})
- else
- # Use the git commit revision for the package version, and add
- # a date prefix for easy comparisons.
- date=$(git log --pretty=format:"%ct" -1 HEAD)
- version=$(printf "%($datefmt)T.g%s%s" ${date} ${head} ${suffix})
- fi
+ tag=$(git describe --tags 2>/dev/null)
+ version=$(printf "%s%s" ${tag} ${suffix})
else
# Check if a specific version is set, eg: by buildroot
if [ ! -z "$PETITBOOT_VERSION" ];
else
# Check if a specific version is set, eg: by buildroot
if [ ! -z "$PETITBOOT_VERSION" ];