Skip to content

Commit

Permalink
Simpler way to define version names.
Browse files Browse the repository at this point in the history
Avoid hitting bugs with max shebang line length in jenkins.
  • Loading branch information
rbarrois committed Apr 27, 2015
1 parent d0de4c4 commit e95475d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
20 changes: 10 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ DOC_DIR=docs
COVERAGE = python $(shell which coverage)

# Dependencies
DJANGO_VERSION ?= 1.8
NEXT_DJANGO_VERSION = $(shell python -c "v='$(DJANGO_VERSION)'; parts=v.split('.'); parts[-1]=str(int(parts[-1])+1); print('.'.join(parts))")
DJANGO ?= 1.8
NEXT_DJANGO = $(shell python -c "v='$(DJANGO)'; parts=v.split('.'); parts[-1]=str(int(parts[-1])+1); print('.'.join(parts))")

ALCHEMY_VERSION ?= 1.0
NEXT_ALCHEMY_VERSION = $(shell python -c "v='$(ALCHEMY_VERSION)'; parts=v.split('.'); parts[-1]=str(int(parts[-1])+1); print('.'.join(parts))")
ALCHEMY ?= 1.0
NEXT_ALCHEMY = $(shell python -c "v='$(ALCHEMY)'; parts=v.split('.'); parts[-1]=str(int(parts[-1])+1); print('.'.join(parts))")

MONGOENGINE_VERSION ?= 0.9
NEXT_MONGOENGINE_VERSION = $(shell python -c "v='$(MONGOENGINE_VERSION)'; parts=v.split('.'); parts[-1]=str(int(parts[-1])+1); print('.'.join(parts))")
MONGOENGINE ?= 0.9
NEXT_MONGOENGINE = $(shell python -c "v='$(MONGOENGINE)'; parts=v.split('.'); parts[-1]=str(int(parts[-1])+1); print('.'.join(parts))")

REQ_FILE = auto_dev_requirements_django$(DJANGO_VERSION)_alchemy$(ALCHEMY_VERSION)_mongoengine$(MONGOENGINE_VERSION).txt
REQ_FILE = auto_dev_requirements_django$(DJANGO)_alchemy$(ALCHEMY)_mongoengine$(MONGOENGINE).txt

all: default

Expand All @@ -30,9 +30,9 @@ install-deps: $(REQ_FILE)

$(REQ_FILE): dev_requirements.txt requirements.txt
grep --no-filename "^[^#-]" $^ | egrep -v "^(Django|SQLAlchemy|mongoengine)" > $@
echo "Django>=$(DJANGO_VERSION),<$(NEXT_DJANGO_VERSION)" >> $@
echo "SQLAlchemy>=$(ALCHEMY_VERSION),<$(NEXT_ALCHEMY_VERSION)" >> $@
echo "mongoengine>=$(MONGOENGINE_VERSION),<$(NEXT_MONGOENGINE_VERSION)" >> $@
echo "Django>=$(DJANGO),<$(NEXT_DJANGO)" >> $@
echo "SQLAlchemy>=$(ALCHEMY),<$(NEXT_ALCHEMY)" >> $@
echo "mongoengine>=$(MONGOENGINE),<$(NEXT_MONGOENGINE)" >> $@


clean:
Expand Down
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -326,13 +326,13 @@ To test with a specific framework version, you may use:

.. code-block:: sh
$ make DJANGO_VERSION=1.7 test
$ make DJANGO=1.7 test
Valid options are:

* ``DJANGO_VERSION`` for ``Django``
* ``MONGOENGINE_VERSION`` for ``mongoengine``
* ``ALCHEMY_VERSION`` for ``SQLAlchemy``
* ``DJANGO`` for ``Django``
* ``MONGOENGINE`` for ``mongoengine``
* ``ALCHEMY`` for ``SQLAlchemy``


Contents, indices and tables
Expand Down

0 comments on commit e95475d

Please sign in to comment.