diff options
author | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2020-08-05 14:32:04 +0200 |
---|---|---|
committer | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2020-08-06 16:20:15 +0200 |
commit | f32261f2577ef951e0e69dceae6600478da7f798 (patch) | |
tree | 8f10f8cc214289485abdee4bab009c992938a36b /utils | |
parent | 035ee23910233eabbdaed1469f3d329d66e0ead4 (diff) |
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>
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/gen-version.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/gen-version.sh b/utils/gen-version.sh index 7f7872ce..b09ad495 100755 --- a/utils/gen-version.sh +++ b/utils/gen-version.sh @@ -26,7 +26,7 @@ if [ -z "$build_dir" ] || (echo "$build_dir" | grep -q "$src_dir") then git update-index --refresh > /dev/null 2>&1 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 # of the git SHA1 and remove the initial 'v'. |