refine build script for private repo settings