Created
January 23, 2020 18:23
-
-
Save C-Saunders/5d7b4d4fc8c20d6f2625aa3a7c07d6fb to your computer and use it in GitHub Desktop.
List Heroku buildpacks for each app using the Heroku CLI.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
app_list=$(heroku apps -A -t=${@} | grep -v '^===') | |
for app in $app_list; do | |
buildpacks=$(heroku buildpacks -a $app | grep -v '^===' | sed -E 's/[0-9]+\. //') | |
if [[ $buildpacks =~ "has no Buildpack URL set" ]]; then | |
echo $app "has no buildpacks" | |
else | |
for buildpack in $buildpacks; do | |
echo $app ">>" $buildpack | |
done | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment