parser.add_argument( '--service', help= 'name of the service for which to set the dev build id (e.g. keyvault)' ) parser.add_argument( "-b", '--build-id', required=True, help= 'id of the build (generally of the form YYYYMMDD.r) dot characters(.) will be removed' ) args = parser.parse_args() target_packages = get_packages(args) build_id = format_build_id(args.build_id) if not target_packages: print("No packages found") for target_package in target_packages: try: new_version = get_dev_version(target_package[1][1], build_id) print('{0}: {1} -> {2}'.format(target_package[1][0], target_package[1][1], new_version)) set_version_py(target_package[0], new_version) set_dev_classifier(target_package[0], new_version) except: print('Could not set dev version for package: {0}'.format(
parser.add_argument('--new-version', required=True, help='new package version') parser.add_argument('--service', required=True, help='name of the service for which to set the dev build id (e.g. keyvault)') parser.add_argument('--release-date', help='date in the format "yyyy-MM-dd"') parser.add_argument( dest="glob_string", nargs="?", help=( "A comma separated list of glob strings that will target the top level directories that contain packages." 'Examples: All = "azure-*", Single = "azure-keyvault", Targeted Multiple = "azure-keyvault,azure-mgmt-resource"' ), ) args = parser.parse_args() package_name = args.package_name.replace('_', '-') new_version = args.new_version packages = get_packages(args, package_name) package_map = { pkg[1][0]: pkg for pkg in packages } if package_name not in package_map: raise ValueError("Package name not found: {}".format(package_name)) target_package = package_map[package_name] print('{0}: {1} -> {2}'.format(package_name, target_package[1][1], new_version)) set_version_py(target_package[0], new_version) set_dev_classifier(target_package[0], new_version) update_change_log(target_package[0], new_version, args.service, args.package_name, False, True, args.release_date)
parser.add_argument('--sdk-path', default=DEFAULT_SDK_PATH, help='path to the sdk folder') parser.add_argument( '--always-succeed', action='store_true', help='return exit code 0 even if incorrect versions are detected') parser.add_argument('--service-directory', default='', help='name of a service directory to target packages') args = parser.parse_args() always_succeed = args.always_succeed root_path = path.join(args.sdk_path, args.service_directory) packages = get_packages(root_path) invalid_packages = [] for package in packages: package_name = package[1][0] try: try: version_py_path = get_version_py(package[0]) except: invalid_packages.append( (package_name, 'Could not find _version.py file')) continue with open(version_py_path, 'r') as version_py_file: version_contents = version_py_file.read()
) parser.add_argument('--sdk-path', default=DEFAULT_SDK_PATH, help='path to the sdk folder') parser.add_argument( '--package-name', required=True, help= 'name of package (accetps both formats: azure-service-package and azure_service_pacage)' ) parser.add_argument('--new-version', required=True, help='new package version') args = parser.parse_args() package_name = args.package_name.replace('_', '-') new_version = args.new_version packages = get_packages(args.sdk_path) package_map = {pkg[1][0]: pkg for pkg in packages} if package_name not in package_map: raise ValueError("Package name not found: %s" % package_name) target_package = package_map[package_name] print(f'{package_name}: {target_package[1][1]} -> {new_version}') set_version_py(target_package[0], new_version) set_dev_classifier(target_package[0], new_version)
("A comma separated list of glob strings that will target the top level directories that contain packages." 'Examples: All = "azure-*", Single = "azure-keyvault", Targeted Multiple = "azure-keyvault,azure-mgmt-resource"' ), ) parser.add_argument( '--service', required=True, help= 'name of the service for which to set the dev build id (e.g. keyvault)' ) args = parser.parse_args() package_name = args.package_name.replace('_', '-') packages = get_packages(args, package_name, additional_excludes=["mgmt", "-nspkg"]) package_map = {pkg[1][0]: pkg for pkg in packages} if package_name not in package_map: raise ValueError("Package name not found: {}".format(package_name)) target_package = package_map[package_name] new_version = increment_version(target_package[1][1]) print('{0}: {1} -> {2}'.format(package_name, target_package[1][1], new_version)) set_version_py(target_package[0], new_version) set_dev_classifier(target_package[0], new_version)
'name of the service for which to set the dev build id (e.g. keyvault)' ) parser.add_argument( '--build-id', required=True, help= 'id of the build (generally of the form YYYYMMDD.r) dot characters(.) will be removed' ) args = parser.parse_args() service_name = args.service_name.replace('_', '-') build_id = format_build_id(args.build_id) sdk_path = args.sdk_path packages = get_packages(sdk_path) target_packages = [ pkg for pkg in packages if is_in_service(sdk_path, pkg[0], service_name) ] if not target_packages: print(f"No packages found for service {service_name}") for target_package in target_packages: try: new_version = get_dev_version(target_package[1][1], build_id) print( f'{target_package[1][0]}: {target_package[1][1]} -> {new_version}' )