Skip to content

Commit 8357742

Browse files
author
Matthew Fisher
committed
fix(builder): retrieve process types from slugbuilder's Procfile
/bin/release was unofficially deprecated for declaring default process types a while back, which is why some buildpacks don't supply any default process types in /bin/release. Instead, the buildpack will generate a Procfile if none is supplied.
1 parent 4340f64 commit 8357742

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

builder/image/templates/builder

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,14 @@ echo
138138
if [ -f Procfile ]; then
139139
PROCFILE=$(cat Procfile | /app/bin/yaml2json-procfile)
140140
elif [ -f $TMP_DIR/slug.tgz ]; then
141-
PROCFILE=$(tar --to-stdout -xf $TMP_DIR/slug.tgz ./.release | /app/bin/extract-types)
141+
# Sometimes, the buildpack will generate a Procfile instead of populating /bin/release
142+
# /bin/release was unofficially deprecated for declaring default process types
143+
if tar -tf $TMP_DIR/slug.tgz ./Procfile &> /dev/null;
144+
then
145+
PROCFILE="$(tar --to-stdout -xf $TMP_DIR/slug.tgz ./Procfile | /app/bin/yaml2json-procfile)"
146+
else
147+
PROCFILE=$(tar --to-stdout -xf $TMP_DIR/slug.tgz ./.release | /app/bin/extract-types)
148+
fi
142149
else
143150
PROCFILE="{}"
144151
fi

0 commit comments

Comments
 (0)