{"id":13858,"url":"https://patchwork.libcamera.org/api/patches/13858/?format=json","web_url":"https://patchwork.libcamera.org/patch/13858/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20210915203639.796795-1-kieran.bingham@ideasonboard.com>","date":"2021-09-15T20:36:39","name":"utils: gen-version: Remove redundant character","commit_ref":null,"pull_url":null,"state":"not-applicable","archived":true,"hash":"a2150cb60afb0a7410d37ec1f1a62dcb0622d35a","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/?format=json","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/13858/mbox/","series":[{"id":2535,"url":"https://patchwork.libcamera.org/api/series/2535/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2535","date":"2021-09-15T20:36:39","name":"utils: gen-version: Remove redundant character","version":1,"mbox":"https://patchwork.libcamera.org/series/2535/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/13858/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/13858/checks/","tags":{},"headers":{"Return-Path":"<kieran.bingham@ideasonboard.com>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 227E2BDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 15 Sep 2021 20:36:45 +0000 (UTC)","from localhost.localdomain\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net\n\t[86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B82D22A5;\n\tWed, 15 Sep 2021 22:36:44 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1631738204;\n\tbh=L2OAxstbFr57gDxDiLXi5IVQYCSHK11Sm7L/1f5wGSA=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=pV+c1NeC1c2cSwBAS55946G+PKzCvLoIf62FkikJO59P3fHVcJbtPU/UZdfPznso8\n\tco+HTY/BLIyEjbbzncNt3A0kFf/RsnbD6sYtHQOQvNjePaxgLYbUSOf3iZQl2y/xyW\n\tsdzF0JokOzDNV0lMiKyxNYqDHJWCO6plXWplR0yk=","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"<parsemail@patchwork.libcamera.org>","Cc":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Subject":"[PATCH] utils: gen-version: Remove redundant character","Date":"Wed, 15 Sep 2021 21:36:39 +0100","Message-Id":"<20210915203639.796795-1-kieran.bingham@ideasonboard.com>","X-Mailer":"git-send-email 2.25.1","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit"},"content":"The 'g' version prefix, is added and then stripped.\nPrevent adding it in the first place, to simplify the implementation.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n utils/gen-version.sh | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)","diff":"diff --git a/utils/gen-version.sh b/utils/gen-version.sh\nindex b09ad495f86a..34d5d969311c 100755\n--- a/utils/gen-version.sh\n+++ b/utils/gen-version.sh\n@@ -17,7 +17,7 @@ then\n \t# Handle an un-tagged repository\n \tsha=$(git describe --abbrev=8 --always 2>/dev/null)\n \tcommits=$(git log --oneline | wc -l 2>/dev/null)\n-\tversion=\"v0.0.0-$commits-g$sha\"\n+\tversion=\"v0.0.0-$commits-$sha\"\n fi\n \n # Append a '-dirty' suffix if the working tree is dirty. Prevent false\n@@ -28,8 +28,8 @@ then\n fi\n git diff-index --quiet HEAD || version=\"$version-dirty ($(date --iso-8601=seconds))\"\n \n-# Replace first '-' with a '+' to denote build metadata, strip the 'g' in from\n-# of the git SHA1 and remove the initial 'v'.\n-version=$(echo \"$version\" | sed -e 's/-/+/' | sed -e 's/-g/-/' | cut -c 2-)\n+# Replace first '-' with a '+' to denote build metadata, and remove the initial\n+# 'v'.\n+version=$(echo \"$version\" | sed -e 's/-/+/' | cut -c 2-)\n \n echo \"$version\"\n","prefixes":[]}