mirror of
https://github.com/gsi-upm/senpy
synced 2025-08-23 01:52:21 +00:00
Bumped to 0.6.0
* Downloads pip requirements * Modified Makefile
This commit is contained in:
39
Makefile
39
Makefile
@@ -1,4 +1,5 @@
|
||||
PYVERSIONS=3.4 2.7
|
||||
PYMAIN=$(firstword $(PYVERSIONS))
|
||||
NAME=senpy
|
||||
REPO=gsiupm
|
||||
VERSION=$(shell cat $(NAME)/VERSION)
|
||||
@@ -11,28 +12,38 @@ dockerfiles: $(addprefix Dockerfile-,$(PYVERSIONS))
|
||||
Dockerfile-%: Dockerfile.template
|
||||
sed "s/{{PYVERSION}}/$*/" Dockerfile.template > Dockerfile-$*
|
||||
|
||||
build: $(addprefix build-, $(PYVERSIONS))
|
||||
build: $(addprefix build-, $(PYMAIN))
|
||||
|
||||
buildall: $(addprefix build-, $(PYVERSIONS))
|
||||
|
||||
build-%: Dockerfile-%
|
||||
docker build -t '$(REPO)/$(NAME):$(VERSION)-python$*' -f Dockerfile-$* .;
|
||||
|
||||
test: $(addprefix test-,$(PYVERSIONS))
|
||||
test: $(addprefix test-,$(PYMAIN))
|
||||
|
||||
testall: $(addprefix test-,$(PYVERSIONS))
|
||||
|
||||
test-%: build-%
|
||||
docker run --rm -w /usr/src/app/ --entrypoint=/usr/local/bin/python -ti '$(REPO)/$(NAME):$(VERSION)-python$*' setup.py test ;
|
||||
docker run --rm -w /usr/src/app/ --entrypoint=/usr/local/bin/python -ti '$(REPO)/$(NAME):$(VERSION)-python$*' setup.py test --addopts "-vvv -s --pdb" ;
|
||||
|
||||
test_pip-%:
|
||||
docker run --rm -ti python:$* pip -q install senpy ;
|
||||
pip_test-%:
|
||||
docker run --rm -ti python:$* pip install senpy ;
|
||||
|
||||
upload-%:
|
||||
docker push '$(REPO)/$(NAME):$(VERSION)-python$(firstword $(PYVERSIONS))'
|
||||
upload-%: test-%
|
||||
docker push '$(REPO)/$(NAME):$(VERSION)-python$(PYMAIN)'
|
||||
|
||||
upload: test $(addprefix upload-,$(PYVERSIONS))
|
||||
docker tag '$(REPO)/$(NAME):$(VERSION)-python$(firstword $(PYVERSIONS))' '$(REPO)/$(NAME):$(VERSION)'
|
||||
docker tag '$(REPO)/$(NAME):$(VERSION)-python$(firstword $(PYVERSIONS))' '$(REPO)/$(NAME)'
|
||||
docker push '$(REPO)/$(NAME):$(VERSION)'
|
||||
docker push '$(REPO)/$(NAME)'
|
||||
upload: testall $(addprefix upload-,$(PYVERSIONS))
|
||||
docker tag '$(REPO)/$(NAME):$(VERSION)-python$(PYMAIN)' '$(REPO)/$(NAME):$(VERSION)'
|
||||
docker tag '$(REPO)/$(NAME):$(VERSION)-python$(PYVERSIONS)' '$(REPO)/$(NAME)'
|
||||
docker push '$(REPO)/$(NAME):$(VERSION)' docker push '$(REPO)/$(NAME)'
|
||||
python setup.py sdist upload
|
||||
|
||||
test_pip: $(addprefix test_pip-,$(PYVERSIONS))
|
||||
pip_upload:
|
||||
python setup.py sdist upload ;
|
||||
|
||||
.PHONY: test test-% build-% build test test_pip
|
||||
pip_test: $(addprefix pip_test-,$(PYVERSIONS))
|
||||
|
||||
run: build
|
||||
docker run --rm -p 5000:5000 -ti '$(REPO)/$(NAME):$(VERSION)-python$(PYMAIN)'
|
||||
|
||||
.PHONY: test test-% build-% build test test_pip run
|
||||
|
Reference in New Issue
Block a user