From patchwork Fri May 18 10:44:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 916191 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=fwts-devel-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40nPv30y8lz9s08; Fri, 18 May 2018 20:44:46 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1fJcsL-0008Vy-Sf; Fri, 18 May 2018 10:44:41 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1fJcsK-0008Vm-1T for fwts-devel@lists.ubuntu.com; Fri, 18 May 2018 10:44:40 +0000 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1fJcsJ-0006Eg-Of; Fri, 18 May 2018 10:44:39 +0000 From: Colin King To: fwts-devel@lists.ubuntu.com Subject: [PATCH] update_version.sh: also update version in snapcraft.yaml Date: Fri, 18 May 2018 11:44:39 +0100 Message-Id: <20180518104439.25656-1-colin.king@canonical.com> X-Mailer: git-send-email 2.17.0 MIME-Version: 1.0 X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: "fwts-devel" From: Colin Ian King We need to keep the snapcraft version in-sync too, so use sed to edit this and keep it up to date. Signed-off-by: Colin Ian King Acked-by: Ivan Hu Acked-by: Alex Hung --- update_version.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/update_version.sh b/update_version.sh index 3d4d0517..675f53bf 100755 --- a/update_version.sh +++ b/update_version.sh @@ -26,8 +26,14 @@ cat << EOF > src/lib/include/fwts_version.h * */ EOF +# Update fwts_version echo '#define FWTS_VERSION "'$version'"' >> src/lib/include/fwts_version.h echo '#define FWTS_DATE "'`date --utc "+%F %T"`'"' >> src/lib/include/fwts_version.h +# Update snapcraft version +oldsnap_version=$(grep "version: " snapcraft.yaml | cut -d' ' -f2) +sed -i "s/version: ${oldsnap_version}/version: ${version}/" snapcraft.yaml +# Update git repo git add src/lib/include/fwts_version.h +git add snapcraft.yaml git commit -s -m"lib: fwts_version.h - update to $version" git tag -m'"Version '$1'"' $1