Compare commits

...

6 Commits

Author SHA1 Message Date
Kenneth Reitz 31e65dc58b new bpwatch 2013-07-17 17:04:37 -04:00
Kenneth Reitz 9a227e6c73 v24 2013-07-17 08:38:47 -04:00
Kenneth Reitz ddc9c24d34 deep-rm for normal builds 2013-07-17 08:34:14 -04:00
Kenneth Reitz 42488a2be7 deep-rm 2013-07-17 08:33:36 -04:00
Kenneth Reitz 839486c25b make things pretty, skip anvil build for normal runs 2013-07-17 08:25:17 -04:00
Kenneth Reitz 5d56200179 bugfix for legacy apps + usr_env_compile 2013-07-16 16:54:33 -04:00
3 changed files with 57 additions and 45 deletions
+11 -7
View File
@@ -30,16 +30,17 @@ PYTHON_EXE="/app/.heroku/python/bin/python"
PIP_VERSION="1.3.1" PIP_VERSION="1.3.1"
DISTRIBUTE_VERSION="0.6.36" DISTRIBUTE_VERSION="0.6.36"
# Setup bpwatch
export PATH=$PATH:$ROOT_DIR/vendor/bpwatch export PATH=$PATH:$ROOT_DIR/vendor/bpwatch
LOGPLEX_KEY="t.b396af7f-ad75-4643-8b9e-ebb288acc624" LOGPLEX_KEY="t.b396af7f-ad75-4643-8b9e-ebb288acc624"
BUILDPACK_VERSION=HEAD
export BPWATCH_STORE_PATH=$CACHE_DIR/bpwatch.json export BPWATCH_STORE_PATH=$CACHE_DIR/bpwatch.json
BUILDPACK_VERSION=v25
# Support Anvil Build_IDs
[ ! "$REQUEST_ID" ] && REQUEST_ID=$SLUG_ID [ ! "$REQUEST_ID" ] && REQUEST_ID=$SLUG_ID
# Sanitizing environment variables.
unset GIT_DIR PYTHONHOME PYTHONPATH LD_LIBRARY_PATH LIBRARY_PATH
bpwatch init $LOGPLEX_KEY bpwatch init $LOGPLEX_KEY
bpwatch build python $BUILDPACK_VERSION $REQUEST_ID bpwatch build python $BUILDPACK_VERSION $REQUEST_ID
@@ -48,9 +49,6 @@ TMP_APP_DIR=$CACHE_DIR/tmp_app_dir
bpwatch start compile bpwatch start compile
# Sanitizing environment variables.
unset GIT_DIR PYTHONHOME PYTHONPATH LD_LIBRARY_PATH LIBRARY_PATH
# We'll need to send these statics to other scripts we `source`. # 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
@@ -63,8 +61,12 @@ TMP_APP_DIR=$CACHE_DIR/tmp_app_dir
# Copy Anvil app dir to temporary storage... # Copy Anvil app dir to temporary storage...
bpwatch start anvil_appdir_stage bpwatch start anvil_appdir_stage
if [ "$SLUG_ID" ]; then
mkdir -p $TMP_APP_DIR mkdir -p $TMP_APP_DIR
deep-mv $APP_DIR $TMP_APP_DIR deep-mv $APP_DIR $TMP_APP_DIR
else
deep-rm $APP_DIR
fi
bpwatch stop anvil_appdir_stage bpwatch stop anvil_appdir_stage
# Copy Application code in. # Copy Application code in.
@@ -253,7 +255,9 @@ deep-mv $BUILD_DIR $ORIG_BUILD_DIR
bpwatch stop appdir_commit bpwatch stop appdir_commit
bpwatch start anvil_appdir_commit bpwatch start anvil_appdir_commit
if [ "$SLUG_ID" ]; then
deep-mv $TMP_APP_DIR $APP_DIR deep-mv $TMP_APP_DIR $APP_DIR
fi
bpwatch stop anvil_appdir_commit bpwatch stop anvil_appdir_commit
bpwatch stop compile bpwatch stop compile
+8
View File
@@ -52,3 +52,11 @@ function deep-mv (){
rm -fr $1/!(tmp) rm -fr $1/!(tmp)
find -H $1 -maxdepth 1 -name '.*' -a \( -type d -o -type f -o -type l \) -exec rm -fr '{}' \; find -H $1 -maxdepth 1 -name '.*' -a \( -type d -o -type f -o -type l \) -exec rm -fr '{}' \;
} }
# Does some serious deleting.
function deep-rm (){
rm -fr $1/!(tmp)
find -H $1 -maxdepth 1 -name '.*' -a \( -type d -o -type f -o -type l \) -exec rm -fr '{}' \;
}
BIN
View File
Binary file not shown.