You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add function to retrieve package versions from nuget
* update logic in increment_or_set_library_version function in eng\versioning\set_versions.py to allow increment as well as just setting versions
* Add SetPackageVersion function
* Add GetPackageInstallNotes function
* Remove changes not related to changelogs
# This is the case where, somehow, the versioning verification has failed and
277
-
# the prerelease verification doesn't match "beta.X"
278
-
ifpreverisNone:
279
-
# if the build_type isn't data then error
280
-
ifbuild_type.name.lower() !='data':
281
-
raiseValueError('library_to_update ({}:{}) has an invalid prerelease version ({}) which should be of the format beta.X'.format(library_to_update, module.current, vmatch.group('prerelease')))
# This is the case where, somehow, the versioning verification has failed and
278
+
# the prerelease verification doesn't match "beta.X"
279
+
ifpreverisNone:
280
+
# if the build_type isn't data then error
281
+
ifbuild_type.name.lower() !='data':
282
+
raiseValueError('library_to_update ({}:{}) has an invalid prerelease version ({}) which should be of the format beta.X'.format(library_to_update, module.current, vmatch.group('prerelease')))
raiseValueError('library_to_update ({}:{}) has an invalid prerelease version ({}) which should be of the format (beta) or (beta.X)'.format(library_to_update, module.current, vmatch.group('prerelease')))
287
+
# in the case there the prerelease version is just "beta", increment the minor and set the patch to 0
raiseValueError('library_to_update ({}:{}) has an invalid prerelease version ({}) which should be of the format (beta) or (beta.X)'.format(library_to_update, module.current, vmatch.group('prerelease')))
286
-
# in the case there the prerelease version is just "beta", increment the minor and set the patch to 0
# if the dependency version isn't a beta and the current version is, don't
310
-
# update the dependency version
311
-
if (vmatch.group('prerelease') isnotNone):
312
-
print('library_to_update {}, has a GA dependency version {} and a beta current version {}. The dependency version will be kept at the GA version. '.format(library_to_update, module.dependency, module.current))
313
-
else:
314
-
print('library_to_update {}, has both GA dependency {} and current {} versions. The dependency will be updated to {}. '.format(library_to_update, module.dependency, module.current, module.current))
# If the dependency version is a beta then just set it to whatever the current
304
+
# version is
305
+
if (vDepMatch.group('prerelease') isnotNone):
306
+
print('library_to_update {}, previous dependency version={}, new dependency version={}'.format(library_to_update, module.dependency, module.current))
315
307
module.dependency=module.current
316
-
print('library_to_update {}, previous current version={}, new current version={}'.format(library_to_update, module.current, new_version))
308
+
# else, the dependency version isn't a pre-release version
309
+
else:
310
+
# if the dependency version isn't a beta and the current version is, don't
311
+
# update the dependency version
312
+
if (vmatch.group('prerelease') isnotNone):
313
+
print('library_to_update {}, has a GA dependency version {} and a beta current version {}. The dependency version will be kept at the GA version. '.format(library_to_update, module.dependency, module.current))
314
+
else:
315
+
print('library_to_update {}, has both GA dependency {} and current {} versions. The dependency will be updated to {}. '.format(library_to_update, module.dependency, module.current, module.current))
316
+
module.dependency=module.current
317
+
print('library_to_update {}, previous current version={}, new current version={}'.format(library_to_update, module.current, new_version))
317
318
module.current=new_version
318
319
newlines.append(module.string_for_version_file())
319
320
@@ -395,6 +396,7 @@ def main():
395
396
optional.add_argument('--artifact-id', '--ai', help='artifactId of the target library')
396
397
optional.add_argument('--group-id', '--gi', help='groupId of the target library')
397
398
optional.add_argument('--prep-source-testing', '--pst', action='store_true', help='prep the version file for source testing')
399
+
optional.add_argument('--new-version', '--nv', help='set an new version.')
398
400
optional.add_argument('--increment-version', '--iv', action='store_true', help='increment the version for a given group/artifact')
399
401
optional.add_argument('--verify-version', '--vv', action='store_true', help='verify the version for a given group/artifact')
400
402
optional.add_argument('--set-dev-zero-version', '--sdzv', action='store_true', help='Set a zero dev build version for packages that do not already have dev versions set (should be run after setting dev versions for other packages)')
@@ -410,7 +412,13 @@ def main():
410
412
elif (args.increment_version):
411
413
ifnotargs.artifact_idornotargs.group_id:
412
414
raiseValueError('increment-version requires both the artifact-id and group-id arguments. artifact-id={}, group-id={}'.format(args.artifact_id, args.group_id))
raiseValueError('new-version requires both the artifact-id and group-id arguments. artifact-id={}, group-id={}'.format(args.artifact_id, args.group_id))
raiseValueError('verify-version requires both the artifact-id and group-id arguments. artifact-id={}, group-id={}'.format(args.artifact_id, args.group_id))
0 commit comments