{"id":17577,"url":"https://patchwork.libcamera.org/api/patches/17577/?format=json","web_url":"https://patchwork.libcamera.org/patch/17577/","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":"<20221010173214.3547133-6-kieran.bingham@ideasonboard.com>","date":"2022-10-10T17:32:14","name":"[libcamera-devel,v3,5/5] utils: Provide a release script","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"0107387566e38d8758a95ba694f74248968963e9","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/17577/mbox/","series":[{"id":3550,"url":"https://patchwork.libcamera.org/api/series/3550/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3550","date":"2022-10-10T17:32:09","name":"Add release infrastructure","version":3,"mbox":"https://patchwork.libcamera.org/series/3550/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/17577/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/17577/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 906FCC3287\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 10 Oct 2022 17:33:29 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4943D62D77;\n\tMon, 10 Oct 2022 19:33:29 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A101E62D72\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 10 Oct 2022 19:33:24 +0200 (CEST)","from Monstersaurus.ksquared.org.uk.beta.tailscale.net\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 376DBBB0;\n\tMon, 10 Oct 2022 19:33:24 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1665423209;\n\tbh=IZrxl9jbE6qf0uXqz/uMRLuoPIyzIBAZmJ+Q1Ninstk=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=FA2G2cxNWLSmT49BXNyJFNEz+ANC7Yhw0Pt9LjFHSsAWZ0asA413GN88TK/VeU+u/\n\tlschx8JAnNaTypdi3KlK8GIGUVEENmmlfEwIM4xgzyoZcJg3+4UM7TtHwOfokg8lJ+\n\ts5pwF6AAu/aiattx2926yPA/CM+obPXuXd4gYkmnNxJYWrD6JTw6E0cozs0sMlWIuF\n\tvj/yUTvqCfdAmF2nLzqBmYuqQnbCFByED2Pq5DYBRLBa6XqPdpiK4qY5fL3m0cecFp\n\tWNtn83YqgK9EJbW3ffM1+dump8ucNcSKLTl/3fX+qhV7lYKIR54BqXHn0bScILpNZD\n\t++urbsLtqGaaw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1665423204;\n\tbh=IZrxl9jbE6qf0uXqz/uMRLuoPIyzIBAZmJ+Q1Ninstk=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=rLVCpJ2MUshl2G8Ht28z5U4vVehahh4hHg1K/YPePE+6xsLQWdSQ/4TXvp2E3qWCw\n\t077UlG8keGA9DHfLBpUlsTv2yRi5BBKFoJUtmzPEJsOBIBk/DnNPRvobh6lkoK7IVV\n\tFbSK42VUW9T6nZHfzRL57J8P8Fis30lFmxXPBEJM="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"rLVCpJ2M\"; dkim-atps=neutral","To":"libcamera devel <libcamera-devel@lists.libcamera.org>","Date":"Mon, 10 Oct 2022 18:32:14 +0100","Message-Id":"<20221010173214.3547133-6-kieran.bingham@ideasonboard.com>","X-Mailer":"git-send-email 2.34.1","In-Reply-To":"<20221010173214.3547133-1-kieran.bingham@ideasonboard.com>","References":"<20221010173214.3547133-1-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v3 5/5] utils: Provide a release script","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Support making releases of libcamera by introducing a helper script\nwhich will facilitate the increment of any release version, along with\ngenerating an associated tag.\n\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n---\nv3\n  - Improve error message\n  - Remove redundant git add\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n utils/release.sh | 44 ++++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 44 insertions(+)\n create mode 100755 utils/release.sh","diff":"diff --git a/utils/release.sh b/utils/release.sh\nnew file mode 100755\nindex 000000000000..14d62aa6005f\n--- /dev/null\n+++ b/utils/release.sh\n@@ -0,0 +1,44 @@\n+#!/bin/sh\n+\n+# SPDX-License-Identifier: GPL-2.0-or-later\n+# Prepare a project release\n+\n+# Abort if we are not within the project root or the tree is not clean.\n+if [ ! -e utils/gen-version.sh ] || [ ! -e .git ]; then\n+\techo \"This release script must be run from the root of libcamera git tree.\"\n+\texit 1\n+fi\n+\n+if ! git diff-index --quiet HEAD; then\n+\techo \"Tree must be clean to release.\"\n+\texit 1\n+fi\n+\n+# Identify current version components\n+version=$(./utils/gen-version.sh)\n+\n+# Decide if we are here to bump major, minor, or patch release.\n+case $1 in\n+\tmajor|minor|patch)\n+\t\tbump=$1;\n+\t\t;;\n+\t*)\n+\t\techo \"You must specify the version bump level: (major, minor, patch)\"\n+\t\texit 1\n+\t\t;;\n+esac\n+\n+new_version=$(./utils/semver bump \"$bump\" \"$version\")\n+\n+echo \"Bumping $bump\"\n+echo \"  Existing version is: $version\"\n+echo \"  New version is : $new_version\"\n+\n+# Patch in the version to our meson.build\n+sed -i -E \"s/ version : '.*',/ version : '$new_version',/\" meson.build\n+\n+# Commit the update\n+git commit meson.build -sm \"libcamera v$new_version\"\n+\n+# Create a tag\n+git tag \"v$new_version\" -asm \"libcamera v$new_version\"\n","prefixes":["libcamera-devel","v3","5/5"]}