deployment script variables (#238)

This commit is contained in:
Saeed Vaziry
2024-06-17 01:12:46 +03:30
committed by GitHub
parent eec83f577c
commit 7d367465ff
4 changed files with 52 additions and 9 deletions

View File

@ -283,4 +283,17 @@ public function hasSSL(): bool
{
return $this->ssls->isNotEmpty();
}
public function environmentVariables(?Deployment $deployment = null): array
{
return [
'SITE_PATH' => $this->path,
'DOMAIN' => $this->domain,
'BRANCH' => $this->branch ?? '',
'REPOSITORY' => $this->repository ?? '',
'COMMIT_ID' => $deployment?->commit_id ?? '',
'PHP_VERSION' => $this->php_version,
'PHP_PATH' => '/usr/bin/php'.$this->php_version,
];
}
}