Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regex update and sealed removed. #3552

Merged
merged 1 commit into from
Apr 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions .github/scripts/check_and_update_jdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

# Query the Oracle website for the latest JDK version
response = requests.get('http://javadl-esd-secure.oracle.com/update/baseline.version')
latest_jdk = re.search(r'(?P<major>\d+)\.', response.text)
latest_jdk = re.search(r'(?P<major>\d+)\.?', response.text)
if latest_jdk is None:
print('Failed to retrieve latest JDK version')
exit(1)
Expand All @@ -33,10 +33,6 @@
uri_base = 'https://ci.eclipse.org/ls/job/jdt-ls-master/lastCompletedBuild/testReport/org.eclipse.jdt.ls.core.internal.{package}/{java_class}/{method}/api/python'
# Define the test URLs to check using the template and list comprehension
tests = [
uri_base.format(package='correction', java_class='ModifierCorrectionsQuickFixTest', method=m) for m in ['testAddSealedMissingClassModifierProposal', 'testAddSealedAsDirectSuperClass', 'testAddPermitsToDirectSuperClass']
] + [
uri_base.format(package='correction', java_class='UnresolvedTypesQuickFixTest', method='testTypeInSealedTypeDeclaration')
] + [
uri_base.format(package='managers', java_class=c, method=m) for c, m in [('EclipseProjectImporterTest', 'testPreviewFeaturesDisabledByDefault'), ('InvisibleProjectImporterTest', 'testPreviewFeaturesEnabledByDefault'), ('MavenProjectImporterTest', f'testJava{latest_jdk}Project')]
]

Expand All @@ -61,11 +57,11 @@

# Replace the ~ with current_jdk
readme_ver_pattern = re.sub('~', current_jdk, readme_ver_pattern)

# Write this to a file for the create-pull-request workflow
with open('latest_jdk.txt', 'w') as f:
f.write(latest_jdk)

# Replace the current supported JDK version with the latest JDK version
readme = re.sub(readme_ver_pattern, latest_jdk, readme)

Expand Down