Skip to content

Commit

Permalink
added rule to load .env in Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
vygandas committed Oct 26, 2023
1 parent 224795e commit 9c3c518
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
#!/usr/bin/make

# --- Load in .env ---

ifneq ("$(wildcard .env)","")
include .env
export $(shell sed 's/=.*//' .env)
endif

# --- Some prep ---

ARGS = `arg="$(filter-out $@,$(MAKECMDGOALS))" && echo $${arg:-${1}}`
DOCKER_RUN_CMD = docker run -it --rm -u $(shell id -u):$(shell id -g) -v ./:/app --workdir="/app" --network="host"

Expand Down

1 comment on commit 9c3c518

@vercel
Copy link

@vercel vercel bot commented on 9c3c518 Oct 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.