<div dir="ltr">Hi Chris, I've been using a bash script to do just that. I am not very good at bash, mind you, so there is plenty of room for improvement, but you can have a look at it and modify to your likes/needs. You are free to do whatever you want with it; to modify, to share, to not share...<div>
<br></div><div style>Regards Kris</div><div style><br></div><div style>Post Script(pun intended): </div><div style><br></div><div>#!/bin/bash<br></div><div><br></div><div><div>NEWVERSION=$1</div><div><br></div><div>isVersionValid () {</div>
<div> if [ `echo $NEWVERSION | grep "[0-9][0-9]*.[0-9][0-9]*.[0-9][0-9]*"` == $NEWVERSION ]</div><div> then</div><div> return 0</div><div> else </div><div> return 1</div><div> fi</div><div>}</div>
<div><br></div><div>setNewVersion() {</div><div> sed -i s/[0-9][0-9]*.[0-9][0-9]*.[0-9][0-9]*/$NEWVERSION/ $1</div><div>}</div><div><br></div><div>isVersionChanged() {</div><div> if [ `cat $1 | grep -o "[0-9][0-9]*.[0-9][0-9]*.[0-9][0-9]*"` == $NEWVERSION ]</div>
<div> then</div><div> return 0</div><div> else</div><div> echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"</div><div> echo $1 " is not changed to " $NEWVERSION</div>
<div> echo "You should check the write permissions:"</div><div> echo</div><div> echo `ls -l $1`</div><div> echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"</div>
<div> return 1</div><div> fi</div><div>}</div><div>###########################################################################################################################################</div><div>#Sanity check</div>
<div>if [ $# != 1 ] </div><div>then</div><div> echo "Error! Please use only one argument."</div><div> exit 1</div><div>fi</div><div>############################################################################################################################################</div>
<div><br></div><div>if isVersionValid</div><div>then</div><div> setNewVersion ./rpm/london-sail.yaml</div><div> setNewVersion ./rpm/london-sail.spec</div><div> setNewVersion ./pages/AboutPage.qml</div><div>else</div><div>
echo $NEWVERSION "is not a valid version number. Try using the number.number.number convention."</div><div> exit 2</div><div>fi</div><div><br></div><div>if isVersionChanged ./rpm/london-sail.yaml && isVersionChanged ./rpm/london-sail.spec && isVersionChanged ./pages/AboutPage.qml</div>
<div>then</div><div> echo "Version is successfully changed to" $NEWVERSION</div><div>else</div><div> echo "Error!"</div><div> exit 3</div><div>fi</div></div><div><br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On 20 July 2014 11:26, Chris Walker <span dir="ltr"><<a href="mailto:cdw_nokiaqt@the-walker-household.co.uk" target="_blank">cdw_nokiaqt@the-walker-household.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Is there any way to have my 'About' page pick up the Version and<br>
Release information from the yaml file?<br>
<br>
At the moment, I'm hard coding the versioninfo in the About page but<br>
I'd like it to be updated automagically in the future.<br>
<br>
I looked around but couldn't see this information anywhere so I'm<br>
guessing that this question hasn't been asked/answered before but if it<br>
has, please feel free to point me in the right direction.<br>
_______________________________________________<br>
SailfishOS.org Devel mailing list<br>
To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org">devel-unsubscribe@lists.sailfishos.org</a><br>
</blockquote></div><br></div>