def remove_build_suffix(version):
  """Remove build suffix (if exists) from a version."""
  if version.find("-dev") >= 0:
    return version[:version.find("-dev")]
  if version.find(".dev") >= 0:
    return version[:version.find(".dev")]
  if version.find("dev") >= 0:
    return version[:version.find("dev")]
  return version