Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# shellcheck shell=bash
# This is an example of a .env file
export GOMAXPROCS=6
export KO_DOCKER_REPO=gcr.io/tektoncd/pipeline
18 changes: 18 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# shellcheck shell=bash

# If .env missing; restore from .env.sample and validate
# See https://github.com/direnv/direnv/wiki/.envrc-Boilerplate
if [[ -f .env.sample ]]; then
if [[ ! -f .env ]]; then
if ! command -v createnv > /dev/null; then
echo 'WARN|Createnv missing; try: pyenv local 3.x && pip install createnv'
else
createnv --use-default --overwrite || echo 'ERROR|https://github.com/cuducos/createnv'
if command dotenv-linter --version >&/dev/null; then
dotenv-linter .env || echo 'ERROR|https://dotenv-linter.github.io'
fi
fi
fi
fi

dotenv_if_exists || direnv status # https://direnv.net/man/direnv-stdlib.1.html
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,6 @@ test/pullrequest/pullrequest-init

# Backup of API reference docs generated by sed
docs/pipeline-api.md.backup

# Ignore .env files
/.env