From dd0aee7b06c0f244635776ee933ce143e9dfad65 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz <me@kennethreitz.org> Date: Fri, 20 Apr 2018 10:16:27 -0400 Subject: [PATCH] update metrics --- bin/steps/collectstatic | 14 ++++++-------- bin/steps/pip-install | 5 +---- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/bin/steps/collectstatic b/bin/steps/collectstatic index 73f03cf0..d99f021e 100755 --- a/bin/steps/collectstatic +++ b/bin/steps/collectstatic @@ -44,22 +44,20 @@ if [ ! "$DISABLE_COLLECTSTATIC" ] && [ -f "$MANAGE_FILE" ] && [ "$DJANGO_INSTALL # Display a warning if collectstatic failed. [ "$COLLECTSTATIC_STATUS" -ne 0 ] && { - mcount "failure.collectstatic" - if grep -q 'SyntaxError' "$COLLECTSTATIC_LOG"; then mcount "failure.collectstatic.syntax-error" - fi - if grep -q 'ImproperlyConfigured' "$COLLECTSTATIC_LOG"; then + elif grep -q 'ImproperlyConfigured' "$COLLECTSTATIC_LOG"; then mcount "failure.collectstatic.improper-configuration" - fi - if grep -q 'The CSS file' "$COLLECTSTATIC_LOG"; then + elif grep -q 'The CSS file' "$COLLECTSTATIC_LOG"; then mcount "failure.collectstatic.fancy-references" - fi - if grep -q 'OSError' "$COLLECTSTATIC_LOG"; then + elif grep -q 'OSError' "$COLLECTSTATIC_LOG"; then mcount "failure.collectstatic.missing-file" + + else + mcount "failure.collectstatic.other" fi echo diff --git a/bin/steps/pip-install b/bin/steps/pip-install index 9818928a..f28a9f92 100755 --- a/bin/steps/pip-install +++ b/bin/steps/pip-install @@ -20,9 +20,6 @@ if [ ! "$SKIP_PIP_INSTALL" ]; then mcount "tool.pip" # Count expected build failures. - if grep -q 'wsgiref' requirements.txt; then - mcount "failure.wsgiref" - fi if grep -q '==0.0.0' requirements.txt; then mcount "failure.none-version" fi @@ -35,10 +32,10 @@ if [ ! "$SKIP_PIP_INSTALL" ]; then show-warnings if [[ ! $PIP_STATUS -eq 0 ]]; then + mcount "failure.pip-install" exit 1 fi - # Smart Requirements handling cp requirements.txt .heroku/python/requirements-declared.txt /app/.heroku/python/bin/pip freeze --disable-pip-version-check > .heroku/python/requirements-installed.txt -- GitLab