Skip to content

Commit

Permalink
Allow setting of auto_source in deployment scripts (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrooksuk authored Sep 25, 2023
1 parent 537ca7d commit af92308
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/Actions/ManagesSites.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,15 @@ public function siteDeploymentScript($serverId, $siteId)
* @param int $serverId
* @param int $siteId
* @param string $content
* @param bool $autoSource
* @return void
*/
public function updateSiteDeploymentScript($serverId, $siteId, $content)
public function updateSiteDeploymentScript($serverId, $siteId, $content, $autoSource = false)
{
$this->put("servers/$serverId/sites/$siteId/deployment/script", compact('content'));
$this->put("servers/$serverId/sites/$siteId/deployment/script", [
'content' => $content,
'auto_source' => $autoSource,
]);
}

/**
Expand Down
5 changes: 3 additions & 2 deletions src/Resources/Site.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,12 @@ public function getDeploymentScript()
* Update the content of the site's deployment script.
*
* @param string $content
* @param bool $autoSource
* @return void
*/
public function updateDeploymentScript($content)
public function updateDeploymentScript($content, $autoSource = false)
{
$this->forge->updateSiteDeploymentScript($this->serverId, $this->id, $content);
$this->forge->updateSiteDeploymentScript($this->serverId, $this->id, $content, $autoSource);
}

/**
Expand Down

0 comments on commit af92308

Please sign in to comment.