buildCommands 支持传入指定func

Signed-off-by: azrael <azrael@imatlas.com>