Skip to content

Commit

Permalink
💚 Change release command
Browse files Browse the repository at this point in the history
Signed-off-by: mathieu.brunot <mb.mathieu.brunot@gmail.com>
  • Loading branch information
madmath03 committed Jun 11, 2019
1 parent 15ea62c commit 06c830d
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ env:
- NODE_VERSION=10.16.0 COMMAND=clean
- NODE_VERSION=10.16.0 COMMAND=build-devenv
#- NODE_VERSION=10.16.0 COMMAND=run-devenv
# TODO Add unit test command(s)
#- NODE_VERSION=10.16.0 COMMAND=test
- NODE_VERSION=10.16.0 COMMAND=build-release
- NODE_VERSION=10.16.0 COMMAND=build-release-frontend
- NODE_VERSION=10.16.0 COMMAND=build-release-backend
- NODE_VERSION=10.16.0 COMMAND=run-release
10 changes: 10 additions & 0 deletions backend/scripts/prepare-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
rm -rf ../dist || exit 1;

rsync -avr \
--exclude="/test" \
--exclude="/resources/public/media" \
--exclude="/target" \
--exclude="/scripts" \
--exclude="/.*" \
../ ../dist/;
2 changes: 1 addition & 1 deletion docker/devenv/files/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env zsh
set -e
echo "UXBOX Docker entrypoint initialization..."
echo "UXBOX Docker Dev entrypoint initialization..."

exec "$@"
19 changes: 18 additions & 1 deletion manage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,19 @@ function build-release-frontend-local {
build-devenv
fi

mkdir -p $HOME/.m2
rm -rf ./frontend/node_modules

CONTAINER=$IMGNAME:latest

echo "Running development image $CONTAINER to build frontend release..."
docker run -ti --rm \
-w /home/uxbox/uxbox/frontend \
-v `pwd`:/home/uxbox/uxbox \
-v $HOME/.m2:/home/uxbox/.m2 \
-e UXBOX_API_URL="/api" \
-e UXBOX_VIEW_URL="/view" \
$IMGNAME:latest ./scripts/build-release.sh
$CONTAINER cd /home/uxbox/uxbox/frontend && ./scripts/build-release.sh
}

function build-release-frontend {
Expand All @@ -69,6 +75,17 @@ function build-release-frontend {
}

function build-release-backend-local {
#if ! $(docker images | grep $IMGNAME | grep -q $REV); then
# build-devenv
#fi
#mkdir -p $HOME/.m2
#CONTAINER=$IMGNAME:latest
#echo "Running development image $CONTAINER to build backend release..."
#docker run -ti --rm \
# -w /home/uxbox/uxbox/backend \
# -v `pwd`:/home/uxbox/uxbox \
# -v $HOME/.m2:/home/uxbox/.m2 \
# $CONTAINER cd /home/uxbox/uxbox/backend && ./scripts/prepare-release.sh
rm -rf backend/dist || exit 1;
rsync -avr \
--exclude="/test" \
Expand Down

0 comments on commit 06c830d

Please sign in to comment.