strip quotes in Makefile
This commit is contained in:
parent
80fdd9680d
commit
653ed344be
1 changed files with 3 additions and 1 deletions
4
Makefile
4
Makefile
|
|
@ -2,10 +2,12 @@
|
|||
# Provides easy commands for development workflow
|
||||
|
||||
# Load variables from .env if present so `make` commands pick them up
|
||||
# Strip quotes from values to avoid issues with tools that don't handle them like python-dotenv does
|
||||
ifneq (,$(wildcard .env))
|
||||
include .env
|
||||
# Export all simple KEY=VALUE pairs to the environment for child processes
|
||||
export $(shell sed -n 's/^\([A-Za-z_][A-Za-z0-9_]*\)=.*/\1/p' .env)
|
||||
# Strip single quotes from all exported variables
|
||||
$(foreach var,$(shell sed -n 's/^\([A-Za-z_][A-Za-z0-9_]*\)=.*/\1/p' .env),$(eval $(var):=$(shell echo $($(var)) | sed "s/^'//;s/'$$//")))
|
||||
endif
|
||||
|
||||
.PHONY: help dev dev-cpu dev-local infra stop clean build logs shell-backend shell-frontend install \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue