replace-env

command module
v0.1.210213 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2021 License: MIT Imports: 11 Imported by: 0

README

replace-env

It works great when there has different .env(.env.json) file for different environment.

How it works

You need set your different environment variables for different environment in your operate system.For example:

...
export DEV_HTTPS=false
export PROD_HTTPS=true
...

and your .env should like:

...
HTTPS=
...

Usage

replace-env source-file output-file

.env

replace-env e .env.example .env

.env.json

replace j .env.json.example .env.json

custom branch environment variables(default: CI_COMMIT_BRANCH)

Drone CI
replace e --branch-env DRONE_BRANCH .env.example .env

GitLab CI

replace e --branch-env CI_COMMIT_BRANCH .env.example .env

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL