-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Project Local Path #34
Comments
@will3m This isn't possible at the moment, but it definitely sounds interesting, and your suggested implementation is actually quite simple, so I might add that. For now, though, let me share a bit about a workaround I have been doing, you may find that it suits you. I keep all my projects in a folder called "htdocs". All of them have a deploy.ini (they don't have the git-deploy file). I have a "deploy" command in my system path, that does the following:
With that, I can write a command like "deploy project1 && deploy project2 && deploy project3", and they're all deployed at the same time. You could even save that as a "deploythreeprojects" command, and then you'd only need to type that. |
@BrunoDEBARROS Thanks for the quick reply. Passing the arguments (with shifting) in bash is a nifty trick I learned yesterday. Your suggestion would be very useful if I was at liberty to use shell scripts. That said I'm sure others will benefit from this feature whether they are using bash scripts or not. In the main function where git is instantiated one can just move that line into the for each server loop and then replace the parameter with a variable from config file. I not gotten around to test though. I'm sure my quick hack will break your The idea, for me, is to run
-- Personally I would automate it using a script like you suggested. |
What I was thinking about doing, actually, is have a "repository" option in the .ini files that you could use to override the repository to use for deploying. What that'd mean is that you could have a folder with git-deploy and a deploy.ini that contained the deploy configs for your projects, along with their repo paths, so that when you did "git-deploy", it'd automatically deploy all of your projects. That sounds clean and simple to me. Thoughts? |
My thoughts exactly. The structure was mainly to illustrate that one repository may contain more than one deployment strategy. Essentially the repositories could be scattered all over and still be deployed from a single "git-deploy". |
It sounds like a great idea; I'll try to add this to git-deploy-php as soon as possible. |
Here's how I got it working, sorry for not sending a push request. Main (added path var)
Config (added repo_path)
Let me know if it makes sense. |
I need a little assistance with this. I have deploy.ini and git-deploy in the same folder. My actual repo exists in a folder next to them called repo. How to I use the subdirectory repo ? |
You can use the |
Is it possible to set the project's local root path in the config file? It would be very useful for deploying multiple git projects at once using only one config file.
If not, what would be the easiest approach of implementing this feature? E.g. which functions are important...
Thanks for this awesome script!
PS: I know I'm trying my luck here. The neatly typed usage document, states that one should drop the deploy script within a project. It suggests that one should have git-deploy-php and a set of config file for each git project.
The text was updated successfully, but these errors were encountered: