[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fwts-devel
Subject:    [PATCH] update_version.sh: also update version in snapcraft.yaml
From:       Colin King <colin.king () canonical ! com>
Date:       2018-05-18 10:44:39
Message-ID: 20180518104439.25656-1-colin.king () canonical ! com
[Download RAW message or body]

From: Colin Ian King <colin.king@canonical.com>

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 <colin.king@canonical.com>
---
 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
-- 
2.17.0


-- 
fwts-devel mailing list
fwts-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/fwts-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic