Skip to content

Instantly share code, notes, and snippets.

@creichert
Created August 19, 2026 20:45
Show Gist options
  • Select an option

  • Save creichert/1d4f337dc44aa9045aaffbbb5889bd38 to your computer and use it in GitHub Desktop.

Select an option

Save creichert/1d4f337dc44aa9045aaffbbb5889bd38 to your computer and use it in GitHub Desktop.
Load .env vars into build environment from a Makefile
-include .env
DOTENV_REGEXP := ^\#\|^$$
export $(shell cut -d= -s -f1 .env | grep -v '$(DOTENV_REGEXP)' || true)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment