forked from plivo/plivo-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
22 lines (18 loc) · 666 Bytes
/
Makefile
File metadata and controls
22 lines (18 loc) · 666 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
.PHONY: build test run
build:
docker-compose up --build --remove-orphans
start:
docker-compose up --build --remove-orphans --detach
# Wait for the container to be running before attaching
@while [ -z "$$(docker-compose ps -q javaSDK)" ]; do \
sleep 1; \
done
docker attach $$(docker-compose ps -q javaSDK)
test:
@[ "${CONTAINER}" ] && \
docker exec -it $$CONTAINER /bin/bash -c "/usr/src/app/gradlew test" || \
/usr/src/app/gradlew test
run:
@[ "${CONTAINER}" ] && \
(docker exec -it $$CONTAINER /bin/bash -c 'cd /usr/src/app/java-sdk-test/ && javac Test.java && java Test') || \
(cd /usr/src/app/java-sdk-test/ && javac Test.java && java Test)