Update script to use shared functions and logic
This commit is contained in:
parent
617c154d01
commit
cb0564e3e7
@ -3,33 +3,14 @@
|
|||||||
# script/bootstrap: Resolve all dependencies that the application requires to
|
# script/bootstrap: Resolve all dependencies that the application requires to
|
||||||
# run.
|
# run.
|
||||||
|
|
||||||
# If a command fails, exit the script
|
source "$(dirname "${0}")"/../script/include/global_header.inc.sh
|
||||||
set -e
|
|
||||||
|
|
||||||
# Ensure we are in the app root directory (not the /script directory)
|
# Set sass compiling command for this app
|
||||||
cd "$(dirname "${0}")/.."
|
COMPILE_SASS_CMD="webassets -m atst.assets build"
|
||||||
|
|
||||||
if [ -z "${CIBUILD+xxxx}" ]; then
|
# Run the shared bootstrap script
|
||||||
CMD_PREFIX='pipenv run '
|
source ./script/include/run_bootstrap
|
||||||
fi
|
|
||||||
PIP_CMD="${CMD_PREFIX}pip"
|
|
||||||
WEBASSETS_CMD="${CMD_PREFIX}webassets"
|
|
||||||
|
|
||||||
PIPENV_INSTALL_FLAGS='--dev'
|
# Link USWDS fonts into the /static directory
|
||||||
if [ -n "${CIBUILD}" ]; then
|
|
||||||
PIPENV_INSTALL_FLAGS+=' --system --ignore-pipfile'
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Install Python dependencies
|
|
||||||
${PIP_CMD} install --upgrade pip
|
|
||||||
pipenv install ${PIPENV_INSTALL_FLAGS}
|
|
||||||
|
|
||||||
# Install uswds node module and dependencies
|
|
||||||
npm install
|
|
||||||
|
|
||||||
# Relink uswds fonts into the /static directory
|
|
||||||
rm -f ./static/fonts
|
rm -f ./static/fonts
|
||||||
ln -s ../node_modules/uswds/src/fonts ./static/fonts
|
ln -s ../node/modules/uswds/src/fonts ./static/fonts
|
||||||
|
|
||||||
# Precompile assets for deployment
|
|
||||||
${WEBASSETS_CMD} -m atst.assets build
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user