Initial build environment stuff

This commit is contained in:
Jamie Curnow
2018-06-20 08:45:27 +10:00
parent 458f9daf4e
commit 254c5c7add
10 changed files with 276 additions and 47 deletions

4
bin/build Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
sudo /usr/local/bin/docker-compose run --no-deps --rm app npm run-script build
exit $?

18
bin/npm
View File

@ -1,20 +1,4 @@
#!/bin/bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if hash realpath 2>/dev/null; then
export CODEBASE=$(realpath $SCRIPT_DIR/..)
elif hash grealpath 2>/dev/null; then
export CODEBASE=$(grealpath $SCRIPT_DIR/..)
else
export CODEBASE=$(readlink -e $SCRIPT_DIR/..)
fi
if [ -z "$CODEBASE" ]; then
echo "Unable to determine absolute codebase directory"
exit 1
fi
cd "$CODEBASE"
/usr/local/bin/docker-compose run --no-deps --rm -w /srv/manager app npm $@
sudo /usr/local/bin/docker-compose run --no-deps --rm app npm $@
exit $?

View File

@ -1,20 +1,4 @@
#!/bin/bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if hash realpath 2>/dev/null; then
export CODEBASE=$(realpath $SCRIPT_DIR/..)
elif hash grealpath 2>/dev/null; then
export CODEBASE=$(grealpath $SCRIPT_DIR/..)
else
export CODEBASE=$(readlink -e $SCRIPT_DIR/..)
fi
if [ -z "$CODEBASE" ]; then
echo "Unable to determine absolute codebase directory"
exit 1
fi
cd "$CODEBASE"
/usr/local/bin/docker-compose run --no-deps --rm -w /srv/manager app yarn $@
sudo /usr/local/bin/docker-compose run --no-deps --rm app yarn $@
exit $?