[libcamera-devel] [PATCH] libcamera: Add build time to version string
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Wed Aug 5 16:29:33 CEST 2020
Hi Niklas,
Thank you for the patch.
On Wed, Aug 05, 2020 at 02:57:00PM +0200, Niklas Söderlund wrote:
> 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 have 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-05T12:55:11+00:00
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
This will get in the way of reproducible builds, especially for tagged
releases. I would at least restrict this feature to dirty builds, and
even then, I'll let Kieran comment on whether reproducible builds are
important.
> ---
> utils/gen-version.sh | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/utils/gen-version.sh b/utils/gen-version.sh
> index 7f7872ceba7b038a..93bc97d6d8a8a24a 100755
> --- a/utils/gen-version.sh
> +++ b/utils/gen-version.sh
> @@ -32,4 +32,6 @@ git diff-index --quiet HEAD || version="$version-dirty"
> # of the git SHA1 and remove the initial 'v'.
> version=$(echo "$version" | sed -e 's/-/+/' | sed -e 's/-g/-/' | cut -c 2-)
>
> -echo "$version"
> +buildtime=$(date --iso-8601=seconds --utc)
> +
> +echo "$version $buildtime"
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list