Skip to content
Snippets Groups Projects
Commit ab724138 authored by Kenneth Reitz's avatar Kenneth Reitz
Browse files

another approach

parent f8a17611
No related branches found
No related tags found
No related merge requests found
...@@ -54,6 +54,7 @@ export PATH=$PATH:$ROOT_DIR/vendor/pip-pop ...@@ -54,6 +54,7 @@ export PATH=$PATH:$ROOT_DIR/vendor/pip-pop
[ ! "$SLUG_ID" ] && SLUG_ID="defaultslug" [ ! "$SLUG_ID" ] && SLUG_ID="defaultslug"
[ ! "$REQUEST_ID" ] && REQUEST_ID=$SLUG_ID [ ! "$REQUEST_ID" ] && REQUEST_ID=$SLUG_ID
[ ! "$STACK" ] && STACK=$DEFAULT_PYTHON_STACK [ ! "$STACK" ] && STACK=$DEFAULT_PYTHON_STACK
[[ $BUILD_DIR != "/app" ]] && SKIP_MOVE_BUILD=$1
# Sanitizing environment variables. # Sanitizing environment variables.
unset GIT_DIR PYTHONHOME PYTHONPATH unset GIT_DIR PYTHONHOME PYTHONPATH
...@@ -78,7 +79,7 @@ APP_DIR='/app' ...@@ -78,7 +79,7 @@ APP_DIR='/app'
TMP_APP_DIR=$CACHE_DIR/tmp_app_dir TMP_APP_DIR=$CACHE_DIR/tmp_app_dir
# Skip these steps for Docker. # Skip these steps for Docker.
if [[ ! "$DOCKER_BUILD" ]]; then if [[ ! "$SKIP_MOVE_BUILD" ]]; then
# Copy Anvil app dir to temporary storage... # Copy Anvil app dir to temporary storage...
bpwatch start anvil_appdir_stage bpwatch start anvil_appdir_stage
...@@ -92,10 +93,7 @@ if [[ ! "$DOCKER_BUILD" ]]; then ...@@ -92,10 +93,7 @@ if [[ ! "$DOCKER_BUILD" ]]; then
# Copy Application code in. # Copy Application code in.
bpwatch start appdir_stage bpwatch start appdir_stage
# Skip copying the code if we're already in the right spot. deep-cp $BUILD_DIR $APP_DIR
if [[ $BUILD_DIR != "/app" ]]; then
deep-cp $BUILD_DIR $APP_DIR
fi
bpwatch stop appdir_stage bpwatch stop appdir_stage
fi fi
...@@ -256,7 +254,7 @@ bpwatch start dump_cache ...@@ -256,7 +254,7 @@ bpwatch start dump_cache
bpwatch stop dump_cache bpwatch stop dump_cache
# Fin. # Fin.
if [[ ! "$DOCKER_BUILD" ]]; then if [[ ! "$SKIP_MOVE_BUILD" ]]; then
bpwatch start appdir_commit bpwatch start appdir_commit
deep-rm $ORIG_BUILD_DIR deep-rm $ORIG_BUILD_DIR
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment