I'm writing a little app in KohanaPHP framework. Suppose, this app will have some updates in future. Current version is for example v1.0.
What is the best and the most optimal way to:
So far, I use cURL to get info form version.txt file in my remote file and then I compare it with constant variable in app engine. Then I use https://github.com/kanema/kohana-ftp module to connect with server and update app.
Is there any better solution, especially in checking for updates (this with version.txt is a bit annoying and take some time).
This will be the fastest (based on Git internal mechanisms) solution, very reliable (you will be using version control system) and quite secure (you will not be overwriting for example files uploaded by users).
There are some examples of such tools on the Internet.
There is also some example of simply pulling recent changes from the Git repository using cron jobs here: stackoverflow.com/questions/4414140/git-auto-pull-using-cronjob
Alternatively, you can use so called "Service hooks" to call the update scripts only when the version in the repository is changed by someone making the push to the repository (feature is available for example in GitHub).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With