Emoncms 9.8.3 released to emonPi Stable branch

Emoncms 9.8.3 has been release to Stable branch:

See Emoncms 9.8.3 change log.

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.

Glyn,

Would it make more sense to list the change log with the newest version at the top?

The way it is now, the first thing you see is:

Emoncms 9.8.3 | 2017.04.18

glynhudson released this an hour ago

9.8.2 | 2017.03.03




Granted, one only has to look a bit further down their screen to see:

9.8.3 | 2017.04.18

But, as more entries are made, the newest release info will get pushed down the list vice being at the top where it’s quickly and easily spotted.

Sure, good idea. I’ve swapped them round.

The 9.8.2 changes were only included since we skipped doing an official release for 9.8.2. e.g 9.8.1 has its own release entry:

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 :slight_smile:

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

Yes own install on a Pi

Master or Stable, what ever the original install instructions said :slight_smile: 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?

Cheers

@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.

2 Likes

@pb66 That is exactly what I am after to update the repos. :grinning:

Does anything need to be stopped and started?

Is there any way (command) to list the local release and the remote release?

So I played a bit more but could not understand why the local command

git describe --tags

gave me 9.9.0

Then I noticed this…

The Tag is 9.9.0 for version 9.8.0 :frowning:

Subsequent releases are correct! Still do not understand git :confounded:

Sorry, that looks like an error :confounded: , all other versions are correctly tagged, onwards and upwards :slight_smile:

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 ?

I don’t see why not.

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.

Done :slight_smile:

Thanks