.env file read with Make

This commit is contained in:
pseusys
2023-02-16 23:51:41 +01:00
parent 3e7044d5d9
commit ee1b2c0aca

View File

@@ -2,7 +2,8 @@
.DEFAULT_GOAL = help
SHELL = /bin/bash
PATH := venv/bin:node_modules/.bin:$(PATH)
ENV = .env.example
include $(ENV)
help:
@@ -24,13 +25,13 @@ venv:
run-locally: venv
@ # Run action locally
source <(cat .env.example | sed 's/=/=/' | sed 's/^/export /') && python3 ./sources/main.py
python3 ./sources/main.py
.PHONY: run-locally
run-container:
@ # Run action in container
docker build -t waka-readme-stats -f Dockerfile .
docker run --env-file .env.example waka-readme-stats
docker run --env-file $(ENV) waka-readme-stats
.PHONY: run-container