Skip to content

Commit

Permalink
[GR-48161] Maven deployments can read version info from a specific su…
Browse files Browse the repository at this point in the history
…ite.

PullRequest: mx/1666
  • Loading branch information
ansalond committed Aug 25, 2023
2 parents b234f4a + 4b41b23 commit 0a29d4c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion common.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"labsjdk-ee-21Debug": {"name": "labsjdk", "version": "ee-21+35-jvmci-23.1-b14-debug", "platformspecific": true },
"labsjdk-ee-21-llvm": {"name": "labsjdk", "version": "ee-21+35-jvmci-23.1-b14-sulong", "platformspecific": true },

"oraclejdk22": {"name": "jpg-jdk", "version": "22", "build_id": "8", "release": true, "platformspecific": true, "extrabundles": ["static-libs"]}
"oraclejdk22": {"name": "jpg-jdk", "version": "22", "build_id": "11", "release": true, "platformspecific": true, "extrabundles": ["static-libs"]}
},

"eclipse": {
Expand Down
11 changes: 7 additions & 4 deletions mx.py
Original file line number Diff line number Diff line change
Expand Up @@ -11944,7 +11944,9 @@ def maven_deploy(args):
parser.add_argument('--suppress-javadoc', action='store_true', help='Suppress javadoc generation and deployment')
parser.add_argument('--all-distribution-types', help='Include all distribution types. By default, only JAR distributions are included', action='store_true')
parser.add_argument('--all-distributions', help='Include all distributions, regardless of the maven flags.', action='store_true')
parser.add_argument('--version-string', action='store', help='Provide custom version string for deployment')
version_parser = parser.add_mutually_exclusive_group()
version_parser.add_argument('--version-string', action='store', help='Provide custom version string for deployment')
version_parser.add_argument('--version-suite', action='store', help='The name of a vm suite that provides the version string for deployment')
parser.add_argument('--licenses', help='Comma-separated list of licenses that are cleared for upload. Only used if no url is given. Otherwise licenses are looked up in suite.py', default='')
parser.add_argument('--gpg', action='store_true', help='Sign files with gpg before deploying')
parser.add_argument('--gpg-keyid', help='GPG keyid to use when signing files (implies --gpg)', default=None)
Expand All @@ -11959,10 +11961,11 @@ def maven_deploy(args):
logv('Implicitly setting gpg to true since a keyid was specified')

_mvn.check()
def versionGetter(suite):
def versionGetter(_suite):
if args.version_string:
return args.version_string
return suite.release_version(snapshotSuffix='SNAPSHOT')
s = suite(args.version_suite) if args.version_suite is not None else _suite
return s.release_version(snapshotSuffix='SNAPSHOT')

if args.all_suites:
_suites = suites()
Expand Down Expand Up @@ -18615,7 +18618,7 @@ def alarm_handler(signum, frame):
abort(1, killsig=signal.SIGINT)

# The version must be updated for every PR (checked in CI) and the comment should reflect the PR's issue
version = VersionSpec("6.44.1") # [GR-47931] Disable fatalOptionalError ECJ setting
version = VersionSpec("6.44.2") # [GR-_suite] `mx maven-deploy --version-suite`

_mx_start_datetime = datetime.utcnow()
_last_timestamp = _mx_start_datetime
Expand Down

0 comments on commit 0a29d4c

Please sign in to comment.