From a2c3aaf817618a9312590e2715618c631ba9cae5 Mon Sep 17 00:00:00 2001
From: Kenneth Reitz <me@kennethreitz.org>
Date: Mon, 18 Dec 2017 12:49:11 -0500
Subject: [PATCH] Mcount pipenv and pip (#492)

* mcount pipenv

* more mcount for pip

* shellcheck compliance

* fix typo

Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
---
 bin/steps/pip-install | 6 ++++++
 bin/steps/pipenv      | 5 +++++
 2 files changed, 11 insertions(+)

diff --git a/bin/steps/pip-install b/bin/steps/pip-install
index 8d4d144c..e0d5dd39 100755
--- a/bin/steps/pip-install
+++ b/bin/steps/pip-install
@@ -1,11 +1,17 @@
 #!/usr/bin/env bash
 
+# shellcheck source=bin/utils
+source $BIN_DIR/utils
+
 if [ ! "$SKIP_PIP_INSTALL" ]; then
 
     # Install dependencies with Pip.
     puts-step "Installing requirements with pip"
 
     set +e
+    
+    # Measure that we're using pip.
+    mcount "tool.pip"
 
     /app/.heroku/python/bin/pip install -r "$BUILD_DIR/requirements.txt" --exists-action=w --src=/app/.heroku/src --disable-pip-version-check --no-cache-dir 2>&1 | tee "$WARNINGS_LOG" | cleanup | indent
     PIP_STATUS="${PIPESTATUS[0]}"
diff --git a/bin/steps/pipenv b/bin/steps/pipenv
index db2cf147..857bcd82 100644
--- a/bin/steps/pipenv
+++ b/bin/steps/pipenv
@@ -2,12 +2,17 @@
 
 # export CLINT_FORCE_COLOR=1
 # export PIPENV_FORCE_COLOR=1
+# shellcheck source=bin/utils
+source $BIN_DIR/utils
 
 # Pipenv support (Generate requriements.txt with pipenv).
 if [[ -f Pipfile ]]; then
     if [[ ! -f requirements.txt ]]; then
         puts-step "Installing requirements with latest Pipenv…"
 
+        # Measure that we're using Pipenv.
+        mcount "tool.pipenv"
+
         # Install pipenv.
         /app/.heroku/python/bin/pip install pipenv --upgrade &> /dev/null
 
-- 
GitLab