diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..d06804671fb3de6d0c25fba46e1c5a3975ba9050 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,4 @@ +include: + - project: 'gitlab-ci-cd/composer-packages' + ref: main + file: '/composer-packages.yml' diff --git a/Config.php b/Config.php index 09404b0727cf0ad751239dcf6a80a0ff79ff541a..b360837d0b0ff04c94ccd62db195072c57bacccc 100644 --- a/Config.php +++ b/Config.php @@ -31,6 +31,11 @@ final class Config { */ private static $overwriteValues; + /** + * @var array + */ + private static $userValues; + /** * @var string */ @@ -56,6 +61,11 @@ final class Config { */ private $configFile; + /** + * @var string + */ + private $userConfigFile; + /** * Config constructor. * @@ -69,10 +79,12 @@ final class Config { $this->twig_loader = new Twig_Loader_Array([]); $this->twig = new Twig_Environment($this->twig_loader); $this->configFile = getcwd() . '/.lakedrops.yml'; + $this->userConfigFile = getcwd() . '/.lakedrops.user.yml'; $this->init(); $this->merge($default_values, self::$customValues[$this->component] ?? []); $this->merge([], self::$overwriteValues[$this->component] ?? [], FALSE); + $this->merge([], self::$userValues[$this->component] ?? [], FALSE); $this->migrateFromComposerJson(); } @@ -95,6 +107,12 @@ final class Config { self::$overwriteValues = self::$customValues['stage_overwrites'][$stage]; } } + if (!file_exists($this->userConfigFile)) { + self::$userValues = []; + } + else { + self::$userValues = Yaml::parseFile($this->userConfigFile); + } } }