Skip to content

Commit 441dcd5

Browse files
committed
pulled make file commands into separate executable shell files for more logic handling of git tags
1 parent 49cd367 commit 441dcd5

File tree

5 files changed

+32
-4
lines changed

5 files changed

+32
-4
lines changed

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ docker-dev:
2525
docker-prod: docker-prod-mpserver docker-prod-mpfrontend
2626

2727
docker-prod-mpserver:
28-
docker build --no-cache -t aouyang1/mpserver:$(TRAVIS_TAG) -f mpserver/Dockerfile_prod mpserver/
28+
./docker-prod-mpserver.sh
2929

3030
docker-prod-mpfrontend:
31-
docker build --no-cache -t aouyang1/mpfrontend:$(TRAVIS_TAG) -f mpfrontend/Dockerfile_prod mpfrontend/
31+
./docker-prod-mpfrontend.sh
3232

3333
deploy: undeploy
3434
docker-compose up -d
@@ -39,7 +39,7 @@ undeploy:
3939
push: push-mpserver push-mpfrontend
4040

4141
push-mpserver:
42-
docker push aouyang1/mpserver:$(TRAVIS_TAG)
42+
./push-mpserver.sh
4343

4444
push-mpfrontend:
45-
docker push aouyang1/mpfrontend:$(TRAVIS_TAG)
45+
./push-mpfrontend.sh

docker-prod-mpfrontend.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
TAG=latest
4+
if [ "${TRAVIS_TAG}" != "" ]; then
5+
TAG=${TRAVIS_TAG}
6+
fi
7+
docker build --no-cache -t aouyang1/mpfrontend:${TAG} -f mpserver/Dockerfile_prod mpfrontend/

docker-prod-mpserver.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
TAG=latest
4+
if [ "${TRAVIS_TAG}" != "" ]; then
5+
TAG=${TRAVIS_TAG}
6+
fi
7+
docker build --no-cache -t aouyang1/mpserver:${TAG} -f mpserver/Dockerfile_prod mpserver/

push-mpfrontend.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
TAG=latest
4+
if [ "${TRAVIS_TAG}" != "" ]; then
5+
TAG=${TRAVIS_TAG}
6+
fi
7+
docker push aouyang1/mpfrontend:${TAG}

push-mpserver.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
TAG=latest
4+
if [ "${TRAVIS_TAG}" != "" ]; then
5+
TAG=${TRAVIS_TAG}
6+
fi
7+
docker push aouyang1/mpserver:${TAG}

0 commit comments

Comments
 (0)