From 52d582dc8359836448b3e7182b5abf803d05282c Mon Sep 17 00:00:00 2001 From: Marcin Orlowski Date: Thu, 14 Apr 2016 16:44:26 +0200 Subject: [PATCH] Updated docs --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index c2e6457..89c0ac8 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ -# DotEnv building Helper # +# Process DotEnv - .env building helper tool # DotEnv file (`.env`) are often used as runtime configuration files (i.e. Laravel based PHP projects) and are not stored in your repository, so if you use Continuous Integration (CI) tools like Team City, -you need to create that `.env` file before tests can be started. DotEnv Helper is created to help -you with step. +you need to create that `.env` file before tests can be started. Process DotEnv tool wass created to +help you with step. The main assumption is that you usually have file like `.env.dist` in your repository (so people -know how to create production `.env`). DotEnv helper reads that file and tries to get values +know how to create production `.env`). This tool reads that file and tries to get values for keys present in the file by looking into environmental variables or command line arguments to produce populated, ready to use DotEnv file. Having `.env` created that way lets you keep all needed runtime configuration (i.e. API keys etc) directly in CI configuration, in run step in Team City. @@ -26,7 +26,7 @@ then knowing you want to have own value set for `KEY` you set your build step in CI as shell script: export KEY=bar - vendor/bin/process-env .env.dist > .env + vendor/bin/process-dotenv .env.dist > .env which shall produce `.env` file with content as follow: @@ -40,10 +40,10 @@ and `FOO`, for which we did not provide replacements, were copied unaltered. ## Argument subsitution ## -Aside of env variables you can also pass `key=val` arguments to `process-env` achieve the same +Aside of env variables you can also pass `key=val` arguments to `process-dotenv` achieve the same goal: - vendor/bin/process-env .env.dist KEY=bar > .env + vendor/bin/process-dotenv .env.dist KEY=bar > .env **IMPORTANT:** first argument always refers to source env file. @@ -54,7 +54,7 @@ Both substitution methods can be used together. When key is provided as argument also exists as Env variable, then command line provided value will be used: export KEY=bar - vendor/bin/process-env .env.dist KEY=foo > .env + vendor/bin/process-dotenv .env.dist KEY=foo > .env will produce: @@ -67,10 +67,10 @@ will produce: Use composer to install this package as your development dependency: - composer require --dev marcin-orlowski/dotenv-helper + composer require --dev marcin-orlowski/process-dotenv -It will install `process-env` script in usual `vendor/bin` folder. +It will install `process-dotenv` script in usual `vendor/bin` folder. ## License ##