From 49e9147439d80b2ca1c3f402f01e0a6a2ca3f2fd Mon Sep 17 00:00:00 2001 From: Casey Date: Thu, 21 Feb 2019 14:06:20 -0800 Subject: [PATCH] track usage of older feature steps (#802) * track usage of older feature steps * remove typo whitespace * make buildvars consistently cased --- bin/steps/gdal | 2 +- bin/steps/geo-libs | 3 +++ bin/steps/mercurial | 2 +- bin/steps/nltk | 2 ++ bin/steps/pylibmc | 1 + 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/bin/steps/gdal b/bin/steps/gdal index d546811..03cf81f 100755 --- a/bin/steps/gdal +++ b/bin/steps/gdal @@ -26,9 +26,9 @@ if (pip-grep -s requirements.txt GDAL gdal pygdal &> /dev/null) then mkdir -p .heroku/vendor # Download and extract cryptography into target vendor directory. curl "$VENDORED_GDAL" -s | tar zxv -C .heroku/vendor &> /dev/null + mcount "steps.vendor.gdal" fi GDAL=$(pwd)/vendor export GDAL fi - diff --git a/bin/steps/geo-libs b/bin/steps/geo-libs index f408654..ae47dd2 100755 --- a/bin/steps/geo-libs +++ b/bin/steps/geo-libs @@ -22,6 +22,7 @@ source "$BIN_DIR/utils" # If GDAL exists within requirements, use vendored gdal. if [[ "$BUILD_WITH_GEO_LIBRARIES" ]]; then + mcount "buildvar.BUILD_WITH_GEO_LIBRARIES" if [ ! -f ".heroku/vendor/bin/proj" ]; then echo "-----> Bootstrapping gdal, geos, proj." @@ -31,9 +32,11 @@ if [[ "$BUILD_WITH_GEO_LIBRARIES" ]]; then curl "$VENDORED_GEOS" -s | tar zxv -C .heroku/vendor &> /dev/null curl "$VENDORED_PROJ" -s | tar zxv -C .heroku/vendor &> /dev/null + mcount "steps.vendor.geo_libs" # Copy libjasper from build image to slug. if [[ "$STACK" == "heroku-16" ]]; then cp /usr/lib/x86_64-linux-gnu/libjasper.so* ".heroku/vendor/lib/." + mcount "steps.vendor.libjasper" fi fi diff --git a/bin/steps/mercurial b/bin/steps/mercurial index 9faa0d0..c36cb9a 100755 --- a/bin/steps/mercurial +++ b/bin/steps/mercurial @@ -4,6 +4,6 @@ if [[ -f "requirements.txt" ]]; then if (grep -Fiq "hg+" requirements.txt) then /app/.heroku/python/bin/pip install mercurial | cleanup | indent + mcount "steps.mercurial" fi fi - diff --git a/bin/steps/nltk b/bin/steps/nltk index a930a72..841d7e8 100755 --- a/bin/steps/nltk +++ b/bin/steps/nltk @@ -27,6 +27,8 @@ if sp-grep -s nltk; then python -m nltk.downloader -d "$BUILD_DIR/.heroku/python/nltk_data" "${nltk_packages[@]}" | indent set_env NLTK_DATA "/app/.heroku/python/nltk_data" + mcount "buildvar.NLTK_PACKAGES_DEFINITION" + mcount "steps.nltk" else puts-warn "'nltk.txt' not found, not downloading any corpora" puts-warn "Learn more: https://devcenter.heroku.com/articles/python-nltk" diff --git a/bin/steps/pylibmc b/bin/steps/pylibmc index d17e3b7..4c9c1ae 100755 --- a/bin/steps/pylibmc +++ b/bin/steps/pylibmc @@ -29,6 +29,7 @@ if (pip-grep -s requirements.txt pylibmc &> /dev/null) then mkdir -p .heroku/vendor # Download and extract libmemcached into target vendor directory. curl "$VENDORED_MEMCACHED" -s | tar zxv -C .heroku/vendor &> /dev/null + mcount "steps.vendor.pylibmc" fi LIBMEMCACHED=$(pwd)/vendor