libcamera: Add build time to version string for dirty builds
Having the build time in the version string is useful when building from a dirty worktree and deploying to targets as a quick way to identify the binary has been deployed successfully. Before this change the version string is reported as libcamera v0.0.0+1692-aaff196a-dirty While with this change the version string is reported as libcamera v0.0.0+1692-aaff196a-dirty (2020-08-05T22:42:18+02:00) Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
035ee23910
commit
f32261f257
1 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,7 @@ if [ -z "$build_dir" ] || (echo "$build_dir" | grep -q "$src_dir")
|
||||||
then
|
then
|
||||||
git update-index --refresh > /dev/null 2>&1
|
git update-index --refresh > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
git diff-index --quiet HEAD || version="$version-dirty"
|
git diff-index --quiet HEAD || version="$version-dirty ($(date --iso-8601=seconds))"
|
||||||
|
|
||||||
# Replace first '-' with a '+' to denote build metadata, strip the 'g' in from
|
# Replace first '-' with a '+' to denote build metadata, strip the 'g' in from
|
||||||
# of the git SHA1 and remove the initial 'v'.
|
# of the git SHA1 and remove the initial 'v'.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue