From 97d977e840c2c43d86dbcfb00863cc1222bdafcb Mon Sep 17 00:00:00 2001
From: Dariusz Rybicki <dariusz@elixxir.io>
Date: Fri, 7 Oct 2022 12:55:13 +0200
Subject: [PATCH] Add script that bumps example app build number

---
 Examples/xx-messenger/bump-build-number.sh | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100755 Examples/xx-messenger/bump-build-number.sh

diff --git a/Examples/xx-messenger/bump-build-number.sh b/Examples/xx-messenger/bump-build-number.sh
new file mode 100755
index 00000000..f95dceac
--- /dev/null
+++ b/Examples/xx-messenger/bump-build-number.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+script_dir=$(dirname $(realpath $0))
+project_dir="$script_dir/Project"
+repo_dir="$script_dir/../../"
+
+if [ -n "$(git -C $repo_dir status --porcelain)" ]; then 
+  echo "Repository has uncommitted changes!"
+  exit 1
+fi
+
+cd $project_dir
+xcrun agvtool next-version
+build_number=$(xcrun agvtool what-version -terse)
+
+cd $repo_dir
+git commit -a -m "Bump xx-messenger example app build number to $build_number"
-- 
GitLab