add version/branch to resource and correctly build script_flags