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

Support auto_source in Site::updateDeploymentScript() #166

Closed
AntonCooper opened this issue Sep 18, 2023 · 1 comment · Fixed by #167
Closed

Support auto_source in Site::updateDeploymentScript() #166

AntonCooper opened this issue Sep 18, 2023 · 1 comment · Fixed by #167
Assignees

Comments

@AntonCooper
Copy link
Contributor

I need to programatically make .env variables available to deploy script. There's a way to do this in the Forge UI, but it seems that it's not supported in the SDK's updateDeploymentScript method.

$site->updateDeploymentScript($script); only supports passing the script file and will not accept any parameter for auto_source

My current work-around is to call put directly with the payload:

$this->forgeApi()->put("servers/$site->serverId/sites/{$site->id}/deployment/script", [
   'content' => file_get_contents($deployScript),
   'auto_source' => true,
]);
@driesvints
Copy link
Member

Will be in tomorrow's release. Thanks

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

Successfully merging a pull request may close this issue.

3 participants