Merge branch 'ci'

This commit is contained in:
2016-11-02 14:08:04 -04:00
3 changed files with 22 additions and 3 deletions
+9 -3
View File
@@ -54,6 +54,11 @@ export PATH=$PATH:$ROOT_DIR/vendor/pip-pop
[ ! "$SLUG_ID" ] && SLUG_ID="defaultslug"
[ ! "$REQUEST_ID" ] && REQUEST_ID=$SLUG_ID
[ ! "$STACK" ] && STACK=$DEFAULT_PYTHON_STACK
[[ $BUILD_DIR == "/app" ]] && SKIP_MOVE_BUILD=$1
echo $SKIP_MOVE_BUILD
echo $BUILD_DIR
echo '^^^^'
# Sanitizing environment variables.
unset GIT_DIR PYTHONHOME PYTHONPATH
@@ -78,7 +83,7 @@ APP_DIR='/app'
TMP_APP_DIR=$CACHE_DIR/tmp_app_dir
# Skip these steps for Docker.
if [[ ! "$DOCKER_BUILD" ]]; then
if [[ ! "$SKIP_MOVE_BUILD" ]]; then
# Copy Anvil app dir to temporary storage...
bpwatch start anvil_appdir_stage
@@ -103,10 +108,11 @@ BUILD_DIR=$APP_DIR
# Set up outputs under new context
PROFILE_PATH="$BUILD_DIR/.profile.d/python.sh"
EXPORT_PATH="$BIN_DIR/../export"
GUNICORN_PROFILE_PATH="$BUILD_DIR/.profile.d/python.gunicorn.sh"
# We'll need to send these statics to other scripts we `source`.
export BUILD_DIR CACHE_DIR BIN_DIR PROFILE_PATH
export BUILD_DIR CACHE_DIR BIN_DIR PROFILE_PATH EXPORT_PATH
# Prepend proper environment variables for Python use.
export PATH=$BUILD_DIR/.heroku/python/bin:$BUILD_DIR/.heroku/vendor/bin:$PATH
@@ -252,7 +258,7 @@ bpwatch start dump_cache
bpwatch stop dump_cache
# Fin.
if [[ ! "$DOCKER_BUILD" ]]; then
if [[ ! "$SKIP_MOVE_BUILD" ]]; then
bpwatch start appdir_commit
deep-rm $ORIG_BUILD_DIR
+11
View File
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
# Syntax sugar.
BIN_DIR=$(cd $(dirname $0); pwd) # absolute path
source $BIN_DIR/utils
DISABLE_COLLECTSTATIC=1 "$(dirname ${0:-})/compile" "$1" "$2" "$3"
if [[ -f "$1/requirements-test.txt" ]]; then
/app/.heroku/python/bin/pip install -r requirements-test.txt --exists-action=w --src=./.heroku/src --disable-pip-version-check --no-cache-dir 2>&1 | cleanup | indent
fi
+2
View File
@@ -39,11 +39,13 @@ puts-cmd() {
# Usage: $ set-env key value
set-env() {
echo "export $1=$2" >> $PROFILE_PATH
echo "export $1=$2" >> $EXPORT_PATH
}
# Usage: $ set-default-env key value
set-default-env() {
echo "export $1=\${$1:-$2}" >> $PROFILE_PATH
echo "export $1=\${$1:-$2}" >> $EXPORT_PATH
}
# Usage: $ un-set-env key