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...
Regards Kris Post Script(pun intended): #!/bin/bash NEWVERSION=$1 isVersionValid () { if [ `echo $NEWVERSION | grep "[0-9][0-9]*.[0-9][0-9]*.[0-9][0-9]*"` == $NEWVERSION ] then return 0 else return 1 fi } setNewVersion() { sed -i s/[0-9][0-9]*.[0-9][0-9]*.[0-9][0-9]*/$NEWVERSION/ $1 } isVersionChanged() { if [ `cat $1 | grep -o "[0-9][0-9]*.[0-9][0-9]*.[0-9][0-9]*"` == $NEWVERSION ] then return 0 else echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" echo $1 " is not changed to " $NEWVERSION echo "You should check the write permissions:" echo echo `ls -l $1` echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" return 1 fi } ########################################################################################################################################### #Sanity check if [ $# != 1 ] then echo "Error! Please use only one argument." exit 1 fi ############################################################################################################################################ if isVersionValid then setNewVersion ./rpm/london-sail.yaml setNewVersion ./rpm/london-sail.spec setNewVersion ./pages/AboutPage.qml else echo $NEWVERSION "is not a valid version number. Try using the number.number.number convention." exit 2 fi if isVersionChanged ./rpm/london-sail.yaml && isVersionChanged ./rpm/london-sail.spec && isVersionChanged ./pages/AboutPage.qml then echo "Version is successfully changed to" $NEWVERSION else echo "Error!" exit 3 fi On 20 July 2014 11:26, Chris Walker <cdw_noki...@the-walker-household.co.uk> wrote: > Is there any way to have my 'About' page pick up the Version and > Release information from the yaml file? > > At the moment, I'm hard coding the versioninfo in the About page but > I'd like it to be updated automagically in the future. > > I looked around but couldn't see this information anywhere so I'm > guessing that this question hasn't been asked/answered before but if it > has, please feel free to point me in the right direction. > _______________________________________________ > SailfishOS.org Devel mailing list > To unsubscribe, please send a mail to > devel-unsubscr...@lists.sailfishos.org >
_______________________________________________ SailfishOS.org Devel mailing list To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org