refactor(aio): move scripts into `scripts/` directory

This commit is contained in:
Georgios Kalpakas 2017-03-07 11:36:41 +02:00 committed by Chuck Jazdzewski
parent 093d69f0f0
commit 4ca772eea3
5 changed files with 24 additions and 22 deletions

View File

@ -1,18 +0,0 @@
#!/bin/bash
set -eux -o pipefail
# Constants
DOCKERBUILD_DIR="`dirname $0`/dockerbuild"
SCRIPTS_JS_DIR="$DOCKERBUILD_DIR/scripts-js"
DEFAULT_IMAGE_NAME_AND_TAG="aio-builds:latest"
# Build `scripts-js/`
cd "$SCRIPTS_JS_DIR"
yarn install
yarn run build
cd -
# Create docker image
nameAndOptionalTag=$([ $# -eq 0 ] && echo $DEFAULT_IMAGE_NAME_AND_TAG || echo $1)
sudo docker build --tag $nameAndOptionalTag ${@:2} $DOCKERBUILD_DIR

View File

@ -0,0 +1,16 @@
#!/bin/bash
set -eux -o pipefail
# Set up env
source "`dirname $0`/env.sh"
readonly defaultImageNameAndTag="aio-builds:latest"
# Build `scripts-js/`
cd "$SCRIPTS_JS_DIR"
yarn install
yarn run build
cd -
# Create docker image
readonly nameAndOptionalTag=${1:-$defaultImageNameAndTag}
sudo docker build --tag $nameAndOptionalTag ${@:2} $DOCKERBUILD_DIR

View File

@ -0,0 +1,5 @@
#!/bin/bash
readonly THIS_DIR=$(cd $(dirname $0); pwd)
readonly DOCKERBUILD_DIR="$THIS_DIR/../dockerbuild"
readonly SCRIPTS_JS_DIR="$DOCKERBUILD_DIR/scripts-js"

View File

@ -1,9 +1,8 @@
#!/bin/bash
set -eux -o pipefail
# Constants
SCRIPTS_JS_DIR="`dirname $0`/dockerbuild/scripts-js"
# Set up env
source "`dirname $0`/env.sh"
# Test `scripts-js/`
cd "$SCRIPTS_JS_DIR"

View File

@ -40,6 +40,6 @@ source ${thisDir}/_travis-fold.sh
# Run unit tests for aio/aio-builds-setup
travisFoldStart "test.aio.aio-builds-setup"
./aio-builds-setup/test.sh
./aio-builds-setup/scripts/test.sh
travisFoldEnd "test.aio.aio-builds-setup"
)