Skip to content

Commit 211691e

Browse files
authored
Merge pull request #33 from themsaid/SetBuildEnvironment
Use environment-specific .env file
2 parents 2bfa0fc + 066b0be commit 211691e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/BuildProcess/SetBuildEnvironment.php

+9
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,15 @@ public function __invoke()
4848
return;
4949
}
5050

51+
if (file_exists($this->appPath.'/.env.'.$this->environment)) {
52+
$this->files->copy(
53+
$this->appPath.'/.env.'.$this->environment,
54+
$envPath
55+
);
56+
57+
$this->files->delete($this->appPath.'/.env.'.$this->environment);
58+
}
59+
5160
$this->files->prepend(
5261
$envPath, 'APP_ENV='.$this->environment.PHP_EOL
5362
);

0 commit comments

Comments
 (0)