Adding logic for 'build' hook.