forked from hotosm/tasking-manager
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
46 lines (34 loc) · 1.12 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
DOCKER_VERSION := $(shell docker --version 2>/dev/null)
DOCKER_COMPOSE_VERSION := $(shell docker-compose --version 2>/dev/null)
all:
ifndef DOCKER_VERSION
$(error "command docker is not available, please install Docker")
endif
ifndef DOCKER_COMPOSE_VERSION
$(error "command docker-compose is not available, please install Docker")
endif
build:
docker-compose build --no-cache app
up:
docker-compose up -d
down:
docker-compose down
list:
docker-compose ps
refresh-translatables:
docker-compose exec app sh -c "python manage.py refresh_translatables"
refresh-translations:
docker-compose exec app sh -c "tx pull -af"
tests:test-client test-server
test-client:
docker-compose exec app sh -c "cd /usr/src/app/tests/client && ../../client/node_modules/.bin/karma start ./karma.conf.js --single-run --browsers FirefoxHeadless,ChromeHeadless"
test-server:
docker-compose exec app sh -c "python -m unittest discover tests/server"
fetch:
ifndef PRNUMBER
$(error "Define PRNUMBER variable")
else
git fetch origin pull/$(PRNUMBER)/head:pr$(PRNUMBER)
git checkout pr$(PRNUMBER)
endif
checkout:down fetch build up tests down