Skip to content

Commit

Permalink
use standard/versioned makefiles
Browse files Browse the repository at this point in the history
  • Loading branch information
thraxil committed Apr 29, 2016
1 parent c9dad08 commit 9acc4da
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
7 changes: 4 additions & 3 deletions django.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# VERSION=1.0.0
VE ?= ./ve
MANAGE ?= ./manage.py
FLAKE8 ?= $(VE)/bin/flake8
Expand Down Expand Up @@ -27,15 +28,15 @@ $(PY_SENTINAL): $(REQUIREMENTS) $(VIRTUALENV) $(SUPPORT_DIR)*
test: $(PY_SENTINAL)
$(MANAGE) jenkins --pep8-exclude=migrations --enable-coverage --coverage-rcfile=.coveragerc

parallel-tests: $(PY_SENTINAL)
$(MANAGE) test --parallel

flake8: $(PY_SENTINAL)
$(FLAKE8) $(PY_DIRS) --max-complexity=$(MAX_COMPLEXITY)

runserver: check
$(MANAGE) runserver $(INTERFACE):$(RUNSERVER_PORT)

gunicorn: check
$(VE)/bin/gunicorn $(APP).wsgi:application

migrate: check jenkins
$(MANAGE) migrate

Expand Down
1 change: 1 addition & 0 deletions js.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# VERSION=1.0.0
# expect JS_FILES to be set from the main Makefile, but default
# to everything in media/js otherwise.
JS_FILES ?= media/js
Expand Down
12 changes: 12 additions & 0 deletions make.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# VERSION=1.0.0

GITHUB_BASE ?= https://raw.githubusercontent.com/ccnmtl/makefiles/master/
WGET ?= wget
WGET_FLAGS ?= "-O"

update_makefiles:
for f in $$(grep -l "^# VERSION=" *.mk) ; do \
$(WGET) $(GITHUB_BASE)$$f $(WGET_FLAGS) $$f ; \
done

.PHONY: update_makefiles

0 comments on commit 9acc4da

Please sign in to comment.