Skip to content

Commit

Permalink
feat(builder): add pre-compile/post-compile hooks
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Matthew Fisher committed Jun 18, 2016
1 parent 58d98a2 commit 1f652ae
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions rootfs/builder/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,24 @@ else
exit 1
fi

## Run pre-compile hook

if [[ -f "$build_root/bin/pre-compile" ]]; then
"$build_root/bin/pre-compile"
fi

## Buildpack compile

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

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

## Run post-compile hook

if [[ -f "$build_root/bin/post-compile" ]]; then
"$build_root/bin/post-compile"
fi

## Display process types

echo_title "Discovering process types"
Expand Down

0 comments on commit 1f652ae

Please sign in to comment.