MCPcopy Create free account
hub / github.com/apache/fory / run_release

Function run_release

ci/tasks/java.py:380–408  ·  view source on GitHub ↗

Release to Maven Central.

()

Source from the content-addressed store, hash-verified

378
379
380def run_release():
381 """Release to Maven Central."""
382 logging.info("Starting release to Maven Central with Java")
383 java_major = get_jdk_major_version()
384 if java_major is None or java_major < 25:
385 raise RuntimeError(
386 "Java releases must run on JDK25+ so MR-JAR entries are packaged"
387 )
388 common.cd_project_subdir("java")
389
390 previous_jdk_options = os.environ.get("JDK_JAVA_OPTIONS")
391 os.environ["JDK_JAVA_OPTIONS"] = " ".join(jdk25_javac_options())
392 try:
393 # Clean and install without tests first
394 logging.info("Cleaning and installing dependencies")
395 common.exec_cmd("mvn -T10 -B --no-transfer-progress clean install -DskipTests")
396
397 # Deploy to Maven Central
398 logging.info("Deploying to Maven Central")
399 common.exec_cmd(
400 "mvn -T10 -B --no-transfer-progress clean deploy -Dgpg.skip -DskipTests -Papache-release"
401 )
402 finally:
403 if previous_jdk_options is None:
404 os.environ.pop("JDK_JAVA_OPTIONS", None)
405 else:
406 os.environ["JDK_JAVA_OPTIONS"] = previous_jdk_options
407
408 logging.info("Release to Maven Central completed successfully")
409
410
411def run(version=None, release=False, install_jdks=False, install_fory=False):

Callers 1

runFunction · 0.85

Calls 5

get_jdk_major_versionFunction · 0.85
jdk25_javac_optionsFunction · 0.85
infoMethod · 0.65
getMethod · 0.65
popMethod · 0.45

Tested by

no test coverage detected