Commit 0f56e41e authored by Noah Zoschke's avatar Noah Zoschke

compile hook poc; source PIP_OPTS from Makefile if present

parent 3e55317f
#!/usr/bin/env bash #!/usr/bin/env bash
# bin/compile <build-dir> <cache-dir> # bin/compile <build-dir> <cache-dir>
set -x
set -e set -e
set -o pipefail set -o pipefail
...@@ -19,6 +20,9 @@ function sed() { ...@@ -19,6 +20,9 @@ function sed() {
cd $BUILD_DIR cd $BUILD_DIR
# COMPILE HOOK: export build environment if specified
(make environment 2> /dev/null) && eval $(make environment)
# copy artifacts out of cache if exists # copy artifacts out of cache if exists
mkdir -p $CACHE_DIR mkdir -p $CACHE_DIR
for dir in $VIRTUALENV_DIRS; do for dir in $VIRTUALENV_DIRS; do
...@@ -45,7 +49,7 @@ if [ "$NAME" = "Python/Django" ]; then ...@@ -45,7 +49,7 @@ if [ "$NAME" = "Python/Django" ]; then
fi fi
echo "-----> Installing dependencies using pip version $(pip --version | awk '{print $2}')" echo "-----> Installing dependencies using pip version $(pip --version | awk '{print $2}')"
PIP_DOWNLOAD_CACHE=$PIP_DOWNLOAD_CACHE bin/pip install -r requirements.txt | sed -u 's/^/ /' PIP_DOWNLOAD_CACHE=$PIP_DOWNLOAD_CACHE bin/pip install -r requirements.txt ${PIP_OPTS} | sed -u 's/^/ /'
# store new artifacts in cache # store new artifacts in cache
for dir in $VIRTUALENV_DIRS; do for dir in $VIRTUALENV_DIRS; do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment