Created
June 20, 2021 23:29
-
-
Save dallasmarlow/aa0e8865491ae11fe2d46d291467726c to your computer and use it in GitHub Desktop.
simple python Makefile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:buster-slim | |
RUN apt-get update && \ | |
apt-get install -y python3-pip && \ | |
pip3 install autopep8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.DEFAULT_GOAL := push | |
DIR = $(shell pwd) | |
MAKEFLAGS += --no-builtin-rules | |
MAKEFLAGS += --no-builtin-variables | |
base_img := debian:buster-slim | |
img := abc | |
build: pull | |
docker build -t ${img} . | |
pull: | |
docker pull ${base_img} | |
push: build | |
docker push ${img} | |
fmt: ${DIR}/*.py | |
docker build -t autopep8 -f autopep8.docker . | |
for f in $^ ; do \ | |
docker run \ | |
--rm \ | |
-v ${DIR}:${DIR} \ | |
autopep8 \ | |
autopep8 --in-place $${f} ; \ | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment