Giermann / ccu.io

Extend your Homematic CCU. Script-Engine, Adapters, Logging, Webserver. Socket.IO based, implements Homematic xmlrpc_bin protocol.
http://ccu.io/
1 stars 0 forks source link

Separate update check from ccu.io homepage #6

Open Giermann opened 9 years ago

Giermann commented 9 years ago

Change from simply loading 'http://ccu.io/version.php' to extract current version from available file on GitHub: https://raw.githubusercontent.com/Giermann/ccu.io/master/ccu.io.js

Maybe along with configurable update-URL for different repositories...

Giermann commented 9 years ago

more consistent URLs: https://github.com/hobbyquaker/ccu.io/archive/master.zip https://github.com/hobbyquaker/ccu.io/raw/master/ccu.io.js

Giermann commented 9 years ago

Find version from ccu.io.js:

var fs = require('fs'); var myCCUjs = fs.readFileSync("/opt/ccu.io/ccu.io.js"); var findVer = /settings.version\s=\s"([^"]*)"/ var setVer = findVer.exec(myCCUjs); console.log(setVer.length > 1 ? setVer[1] : "unknown");

Giermann commented 5 years ago

TODO: Update branch "auto-update-new" and merge to master. Also change "update-self.js" to update from configured repository!!