Answer the question
In order to leave comments, you need to log in
How to update php code via git using php?
I have some code that I use a lot, you can call it PHP Framework. I have implemented a php script that updates versions of this framework from my server. But for this to work, I need to constantly manually search for the corrected files and upload them to my server so that everything is updated everywhere.
In order not to suffer, it was decided to use github. But there was a difficulty - I need the framework itself to update the versions (for example, when the admin visits the site). Installing git on every server is not an option. Can you tell me how to check the version and download the necessary updates for the framework using php?
Answer the question
In order to leave comments, you need to log in
You need at least one server with git. on the github for the project, you install a webhook that will send a request with information about the commit to the branch to the specified Http address. every commit of every branch of the project, to be exact. in the receiver script, you filter out the desired branch, you get a list of changed files and upload them to others via FTP, for example.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question