Skip to content

Commit af92308

Browse files
authored
Allow setting of auto_source in deployment scripts (#167)
1 parent 537ca7d commit af92308

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/Actions/ManagesSites.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -238,11 +238,15 @@ public function siteDeploymentScript($serverId, $siteId)
238238
* @param int $serverId
239239
* @param int $siteId
240240
* @param string $content
241+
* @param bool $autoSource
241242
* @return void
242243
*/
243-
public function updateSiteDeploymentScript($serverId, $siteId, $content)
244+
public function updateSiteDeploymentScript($serverId, $siteId, $content, $autoSource = false)
244245
{
245-
$this->put("servers/$serverId/sites/$siteId/deployment/script", compact('content'));
246+
$this->put("servers/$serverId/sites/$siteId/deployment/script", [
247+
'content' => $content,
248+
'auto_source' => $autoSource,
249+
]);
246250
}
247251

248252
/**

src/Resources/Site.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -275,11 +275,12 @@ public function getDeploymentScript()
275275
* Update the content of the site's deployment script.
276276
*
277277
* @param string $content
278+
* @param bool $autoSource
278279
* @return void
279280
*/
280-
public function updateDeploymentScript($content)
281+
public function updateDeploymentScript($content, $autoSource = false)
281282
{
282-
$this->forge->updateSiteDeploymentScript($this->serverId, $this->id, $content);
283+
$this->forge->updateSiteDeploymentScript($this->serverId, $this->id, $content, $autoSource);
283284
}
284285

285286
/**

0 commit comments

Comments
 (0)