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

Allow variable for shared path #3762

Open
lfolco opened this issue Jan 9, 2024 · 3 comments
Open

Allow variable for shared path #3762

lfolco opened this issue Jan 9, 2024 · 3 comments
Labels

Comments

@lfolco
Copy link
Contributor

lfolco commented Jan 9, 2024

Currently, in the [shared.php](deploy:shared) it gets the shared path as a child of the deploy path:

task('deploy:shared', function () {
    $sharedPath = "{{deploy_path}}/shared";
    ...
}

We have a multi-site setup where the shared directory is a sibling of our other sites. It would be great if we could specify that sharedPath variable in deploy.php.

Thanks!

@Schrank
Copy link
Contributor

Schrank commented Jan 9, 2024

Hey @lfolco 👋

Did you try to do it manually and run it though parse() ?

task('deploy:shared', function () {
    $sharedPath = parse("{{deploy_path}}/shared");
    ...
}

@lfolco
Copy link
Contributor Author

lfolco commented Jan 9, 2024

Not sure I follow, in our setup our shared path does not reside within our deploy directory at all:

<root>/shared
-------site1
-------site2
<root>/site1
<root>/site2

So within the `deploy:shared` task, I would need to set the private variable `$sharedPath` (trying to avoid overriding the task if possible)

@Schrank
Copy link
Contributor

Schrank commented Jan 9, 2024

NOW I get what you want. I assumed, that the shared path is a variable you could use like {{shared_path}} and somewhere is a set('shared_path', function() {... }) - but this is not the case 😮

I think this is something worth implementing 🤔

Then you could just overwrite the set and do whatever you want.

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

No branches or pull requests

3 participants