The emonPi will pull from the stable branch during the emonPi / RFM69Pi update process (setup > Admin > emonPi update)
9.8.3 requires an update to Emoncms settings.php, I’ve added into the emonPi update script a md5sum check to see if any user changes are present in settings.php; if no user changes are present (compared to default.emonpi.settings.php) the update process updates the emonPi’s settings.php to latest version.
Could the Change Log have a link to the update instructions. I have just had a look on the ‘Guide’ and ‘Resources’ but cannot find the instructions. I do it so rarely that it is always a pain to try and find the update instructions. I think they are buried in GitHub somewhere
Also, is there any easy way to discover whether any modules need updating?
[edit]
I remember this thread from last year. Could the code be changed to list the installed version and check for the current version on GitHub so alerting the user an update is available. Even better if there was a button to enable the update for each module.
On the emonPi the update is an automated on button press. (setup > Admin > emonPi update)
I take it you’re running Emoncms on a normal server? The version number is shown on the bottom of the page (once logged in).
Are you running the Master or Stable branch?
Updating is just a case of cd’ing into the Emoncms folder e.g /var/www/emoncms and running $ git pull and doing the same for each module e.g. cd /var/www/emoncms/Modules/dashboard
Master or Stable, what ever the original install instructions said How can I check? is it in the .git? Stable I am guessing.
Would it not be possible for the admin page to interrogate this file and put the information there? Perhaps a separate version status page would be a good addition? Is is apin to have to go into each module folder to test to see if there is an update or not.
Is there not an upgrading page anywhere? Do I need to stop any of the processes?
There is a comment on the need to update the settings file. Is there any more detail anywhere?
@borpin, I use this little bash script saved as update_emoncms and made executable.
#!/bin/sh
# emoncms updater script
EMONCMS_DIR=/var/www/html/emoncms
printf "\nUpdate emoncms....\n"
git -C $EMONCMS_DIR pull
for M in $EMONCMS_DIR/Modules/*
do
if [ -d "$M/.git" ]; then
printf "\nUpdate emoncms/$(basename $M)....\n"
git -C $M pull
fi
done
Then just using the update_emoncms command does just that, including all the Modules too.
Sorry, that looks like an error , all other versions are correctly tagged, onwards and upwards
To find out which branch your on use:
$ git branch
If you just cloned using git clone you will be on the default master branch. To switch to stable (recommended if you don’t want to be involved with dev) use:
$ git checkout stable
Nice script, do you think it would be a good idea for us to add this to the Emoncms useful scripts repo ?
Not in my experience, but I will leave that for others to decide, you will need to check if the database needs updating via the admin page afterwards (perhaps that could be added to the script at somepoint using the api call?) and it is very important to check if the settings.php needs changing/updating etc.
The script can be improved a lot, it was just a quick and dirty way of avoiding having to CD in and out of the different folders and doing pulls in each.