Skip to content

Commit 1f652ae

Browse files
author
Matthew Fisher
committed
feat(builder): add pre-compile/post-compile hooks
Some users require a way to stop or check if a service is running before building an app, and sometimes notifying another service after the build is complete.
1 parent 58d98a2 commit 1f652ae

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

rootfs/builder/build.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,24 @@ else
141141
exit 1
142142
fi
143143

144+
## Run pre-compile hook
145+
146+
if [[ -f "$build_root/bin/pre-compile" ]]; then
147+
"$build_root/bin/pre-compile"
148+
fi
149+
144150
## Buildpack compile
145151

146152
"$selected_buildpack/bin/compile" "$build_root" "$cache_root" | ensure_indent
147153

148154
"$selected_buildpack/bin/release" "$build_root" "$cache_root" > $build_root/.release
149155

156+
## Run post-compile hook
157+
158+
if [[ -f "$build_root/bin/post-compile" ]]; then
159+
"$build_root/bin/post-compile"
160+
fi
161+
150162
## Display process types
151163

152164
echo_title "Discovering process types"

0 commit comments

Comments
 (0)