Skip to content

Commit

Permalink
Update makefiles, remove outdated docker config
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolas committed Oct 13, 2023
1 parent 11aa44d commit f857fb8
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 192 deletions.
30 changes: 0 additions & 30 deletions Dockerfile

This file was deleted.

53 changes: 11 additions & 42 deletions django.mk
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# VERSION=1.8.0
# VERSION=1.9.0

# CHANGES:
# 1.9.0 - Use coverage tool directly to generate coverage
# reports.
# - wheel and pip updates
# - Use pre-compiled binary wheel for cryptography
# - Remove Travis references
# 1.8.0 - 2019-10-21 - Don't run flake8 on local_settings.py
# 1.7.0 - 2018-05-31 - Now using python 3 by default
# - Removed virtualenv.py in favor of python 3's
Expand All @@ -22,28 +23,18 @@ MANAGE ?= ./manage.py
REQUIREMENTS ?= requirements.txt
SYS_PYTHON ?= python3
PY_SENTINAL ?= $(VE)/sentinal
WHEEL_VERSION ?= 0.36.2
PIP_VERSION ?= 21.0.1
WHEEL_VERSION ?= 0.41.2
PIP_VERSION ?= 23.2.1
MAX_COMPLEXITY ?= 10
INTERFACE ?= localhost
RUNSERVER_PORT ?= 8000
PY_DIRS ?= $(APP)
BANDIT ?= $(VE)/bin/bandit
FLAKE8 ?= $(VE)/bin/flake8
PIP ?= $(VE)/bin/pip
COVERAGE ?= $(VE)/bin/coverage

# Travis has issues here. See:
# https://github.com/travis-ci/travis-ci/issues/9524
ifeq ($(TRAVIS),true)
BANDIT ?= bandit
FLAKE8 ?= flake8
PIP ?= pip
COVERAGE ?= coverage
else
BANDIT ?= $(VE)/bin/bandit
FLAKE8 ?= $(VE)/bin/flake8
PIP ?= $(VE)/bin/pip
COVERAGE ?= $(VE)/bin/coverage
endif

jenkins: check flake8 test eslint bandit
jenkins: check flake8 test bandit

$(PY_SENTINAL): $(REQUIREMENTS)
rm -rf $(VE)
Expand All @@ -55,7 +46,7 @@ $(PY_SENTINAL): $(REQUIREMENTS)
touch $@

test: $(PY_SENTINAL)
$(COVERAGE) run --source='.' --omit=$(VE)/* $(MANAGE) test $(APP)
$(COVERAGE) run --source='.' --omit=$(VE)/* $(MANAGE) test $(PY_DIRS)
$(COVERAGE) xml -o reports/coverage.xml

parallel-tests: $(PY_SENTINAL)
Expand Down Expand Up @@ -88,26 +79,4 @@ clean:
rm -rf node_modules
find . -name '*.pyc' -exec rm {} \;

pull:
git pull
make check
make test
make migrate
make flake8

rebase:
git pull --rebase
make check
make test
make migrate
make flake8

# run this one the very first time you check
# this out on a new machine to set up dev
# database, etc. You probably *DON'T* want
# to run it after that, though.
install: jenkins
createdb $(APP)
make migrate

.PHONY: jenkins test flake8 runserver migrate check shell clean pull rebase install
.PHONY: jenkins test flake8 runserver migrate check shell clean
33 changes: 0 additions & 33 deletions docker-compose.yml

This file was deleted.

48 changes: 0 additions & 48 deletions docker-run.sh

This file was deleted.

37 changes: 0 additions & 37 deletions docker.mk

This file was deleted.

14 changes: 12 additions & 2 deletions js.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# VERSION=1.3.0
# VERSION=1.3.1

# CHANGES:
# 1.3.1 - conditionally install npm deps based on ENVIRONMENT var
# 1.3.0 - restore eslint
# 1.2.0 - restore jshint/jscs

Expand All @@ -22,9 +23,18 @@ NODE_MODULES ?= ./node_modules
JS_SENTINAL ?= $(NODE_MODULES)/sentinal
ESLINT ?= $(NODE_MODULES)/.bin/eslint

NPM_OPTS = --include=dev

ifeq ($(ENVIRONMENT),production)
NPM_OPTS = --only=prod
endif
ifeq ($(ENVIRONMENT),staging)
NPM_OPTS = --only=prod
endif

$(JS_SENTINAL): package.json
rm -rf $(NODE_MODULES)
npm install
npm install $(NPM_OPTS)
touch $(JS_SENTINAL)

eslint: $(JS_SENTINAL)
Expand Down

0 comments on commit f857fb8

Please sign in to comment.