From patchwork Wed Aug 5 12:57:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 9223 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 5DDA2BD86F for ; Wed, 5 Aug 2020 12:57:07 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E7A52605A8; Wed, 5 Aug 2020 14:57:06 +0200 (CEST) Received: from bin-mail-out-05.binero.net (bin-mail-out-05.binero.net [195.74.38.228]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 19D966039D for ; Wed, 5 Aug 2020 14:57:06 +0200 (CEST) X-Halon-ID: 27f4f77b-d71b-11ea-a39b-005056917f90 Authorized-sender: niklas@soderlund.pp.se Received: from bismarck.berto.se (p54ac52a8.dip0.t-ipconnect.de [84.172.82.168]) by bin-vsp-out-02.atm.binero.net (Halon) with ESMTPA id 27f4f77b-d71b-11ea-a39b-005056917f90; Wed, 05 Aug 2020 14:57:04 +0200 (CEST) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: libcamera-devel@lists.libcamera.org Date: Wed, 5 Aug 2020 14:57:00 +0200 Message-Id: <20200805125700.2254511-1-niklas.soderlund@ragnatech.se> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] libcamera: Add build time to version string X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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 --- 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"