From ffb89feb0d67142573e0910d7cd8d1fd98ff73e4 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz <me@kennethreitz.org> Date: Mon, 8 Feb 2016 20:59:03 -0500 Subject: [PATCH] improvements to buildpack output --- bin/steps/collectstatic | 2 +- bin/steps/pip-install | 2 +- bin/utils | 10 ++++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/bin/steps/collectstatic b/bin/steps/collectstatic index 60ef95dd..12f05db1 100755 --- a/bin/steps/collectstatic +++ b/bin/steps/collectstatic @@ -27,7 +27,7 @@ bpwatch start collectstatic # metrics collection if [ ! "$DISABLE_COLLECTSTATIC" ] && [ -f "$MANAGE_FILE" ] && [ "$DJANGO_INSTALLED" ]; then set +e - echo "-----> $ python $MANAGE_FILE collectstatic --noinput" + puts-cmd "python $MANAGE_FILE collectstatic --noinput" # Run collectstatic, cleanup some of the noisy output. python $MANAGE_FILE collectstatic --noinput --traceback 2>&1 | sed '/^Post-processed/d;/^Copying/d;/^$/d' | indent diff --git a/bin/steps/pip-install b/bin/steps/pip-install index 7c0725fd..8f0b61ef 100755 --- a/bin/steps/pip-install +++ b/bin/steps/pip-install @@ -1,5 +1,5 @@ # Install dependencies with Pip. -puts-step "Installing dependencies with pip" +puts-cmd "pip install -r requirements.txt" [ ! "$FRESH_PYTHON" ] && bpwatch start pip_install [ "$FRESH_PYTHON" ] && bpwatch start pip_install_first diff --git a/bin/utils b/bin/utils index ff93b53c..569fff9a 100755 --- a/bin/utils +++ b/bin/utils @@ -26,6 +26,11 @@ cleanup() { sed -e 's/\.\.\.\+/.../g' | sed -e '/already satisfied/Id' | sed -e '/Overwriting/Id' | sed -e '/python executable/Id' | sed -e '/no previously-included files/Id' } +# Buildpack Indented line. +puts-line() { + echo " $@" +} + # Buildpack Steps. puts-step() { echo "-----> $@" @@ -36,6 +41,11 @@ puts-warn() { echo " ! $@" } +# Buildpack Commands. +puts-cmd() { + echo " $ $@" +} + # Usage: $ set-env key value set-env() { echo "export $1=$2" >> $PROFILE_PATH -- GitLab