Skip to content
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

Deploy in an existing directory #52

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

leopoiroux
Copy link
Contributor

Hi Mike,
I made ​​a change for authorized to clone in a directory that already exists. This need appears if the directory is an NFS mount (with Vagrant for example). You can not remove this mount point :(
Thank you

$cmd = array();

$cmd[] = "umask {$this->app->env->umask}";
$cmd[] = "if test ! -d {$location}; then mkdir {$location}; fi";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be mkdir -p ?

@tamagokun
Copy link
Owner

If possible I would much prefer sticking with git clone, however I don't believe git allows you to clone into an existing repo.

For this to work we need to try and replicate everything that git clone would do:

From the manual:

Clones a repository into a newly created directory, creates remote-tracking branches for each branch in the cloned repository (visible
using git branch -r), and creates and checks out an initial branch that is forked from the cloned repository's currently active branch.

So rather than just adding the origin/default remote, it should get a list of the remote branches from the local repo and set it up that way.

@tamagokun
Copy link
Owner

A workaround would be to use $env->releases(true) in your config. This will use the current/releases/shared deploy style and will not try to nuke the folder on deploy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants