Codiad / Codiad

Web Based, Cloud IDE
http://codiad.com
MIT License
2.85k stars 697 forks source link

update component #221

Closed daeks closed 11 years ago

daeks commented 11 years ago

currently i'm starting with an update component to keep codiad uptodate:

first screens: image1 Image2

check of new version should be only possible once in 24 hours to reduce bandwith what are your thoughts about that?

tablatronix commented 11 years ago

The github api is already rate limited to something like 60 per hour without a key. So just be sure to use a cache file, but it doesn't need to be 24 hours.

Use ziparchive to extract, and copy over, or delete then copy.

I would be hesitant about updates until codiad has a clear git flow. Right now there is no stable branch.

ksafranski commented 11 years ago

Why not just have it check only when the user initiates the Update Check?

daeks commented 11 years ago

currently i have made it only by initiating in the sidebar, but first of all I wanted to discuss if this feature is wanted or what are the requirements. just thought about an automated update procedure every 24 hours, but you're right... its a little bit useless if someone can click on the sidebar as well.

ksafranski commented 11 years ago

Yeah, I think with an application of this type having checks automated is a bit to intrusive. I would advocate for 'only when I tell it to check'. If I modify the system (which I do) I don't really want to do (or even check for) updates - I'll pull them manually.

daeks commented 11 years ago

first preview 75de5a0f343b91824787f6dc38ba28212121587c (currenty fixed to my own repo + without download etc.)

Flolagale commented 11 years ago

It would be good to handle ourselves the files copy/replacement and to not rely on a server side component such as rsync.

ksafranski commented 11 years ago

^ Agreed.

daeks commented 11 years ago

refactored, now queries directly github for latest commit and displays all changes since your version just have to think how to get current app sha. maybe on installation or is there a way to attach current sha on downloading to the zip file?

image

tablatronix commented 11 years ago

just save a file called .latest with the hash in it when successfully extracting the zip.

daeks commented 11 years ago

currently it just provides the download button to download the zipfile, but thats also a good idea: download https:// github.com/Codiad/Codiad/archive/(hash).zip by the system, extract it to a folder called /update (or similar) and write version hash file into that

For now I have added a method to system.js which creates a file on the first opening of codiad, gets the lastest hash from github and stores it locally. in normal cases this should be the version of the zip you have downloaded, only problem will be if someone adds a newer commit in between of downloading and installing codiad.

tablatronix commented 11 years ago

Oh I thought this was going to be an auto updater, download and extract on server. aka deploy

daeks commented 11 years ago

it might be possible, have everything which is needed for that, but as discussed above not really wanted by Flolagale and Fluidbyte (or i have misunderstood that). I can also implement both, just downloading on the one side and auto-updating on the other side. So everyone can select by himself what he wants to do.

tablatronix commented 11 years ago

I do not see any argument for or against deploys, just the manner of checking.

Flolagale commented 11 years ago

I think that we all were thinking about something that deploys automatically, but that is run manually, so that the updates themselves do not occur at unwanted moments. Correct me if I missed something.

daeks commented 11 years ago

ok then i missunderstood that :)

ksafranski commented 11 years ago

There is now the ability to check for and download updates.

To avoid confusion and complexity I'm closing this issue. Please open an issue specifically for auto-updates if someone is going to pursue this.