Further generalize the implementation of post-build