Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 37a7d7d

Browse files
smillstmernst
andauthored
Fixes to the release scripts (#7226)
Co-authored-by: Michael Ernst <[email protected]>
1 parent cb3659c commit 37a7d7d

2 files changed

Lines changed: 10 additions & 22 deletions

File tree

docs/developer/release/release_build.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,9 @@ def build_and_locally_deploy_maven() -> None:
172172
execute("./gradlew publishToMavenLocal", working_dir=CHECKER_FRAMEWORK)
173173

174174

175-
def build_checker_framework_release(version: str, old_cf_version: str) -> None:
175+
def build_checker_framework_release(
176+
version: str, old_cf_version: str, checker_framework_interm_dir: Path
177+
) -> None:
176178
"""Build the release files for the Checker Framework project and run tests.
177179
178180
The release files include the manual and the zip file.
@@ -193,6 +195,7 @@ def build_checker_framework_release(version: str, old_cf_version: str) -> None:
193195
)
194196

195197
# Build the Checker Framework binaries and documents. Tests are run by release_push.py.
198+
# This also makes the manuals.
196199
gradle_cmd = "./gradlew buildAll"
197200
execute(gradle_cmd, CHECKER_FRAMEWORK)
198201

@@ -202,8 +205,7 @@ def build_checker_framework_release(version: str, old_cf_version: str) -> None:
202205

203206
# Create checker-framework-X.Y.Z.zip and put it in checker_framework_interm_dir
204207
# copy the remaining checker-framework website files to checker_framework_interm_dir
205-
# This also makes the manuals.
206-
gradle_cmd = "./gradlew copyToWebsite -PcfWebsite={checker_framework_interm_dir}"
208+
gradle_cmd = f"./gradlew copyToWebsite -PcfWebsite={checker_framework_interm_dir}"
207209
execute(gradle_cmd, CHECKER_FRAMEWORK)
208210

209211
# clean no longer necessary files left over from building the checker framework tutorial
@@ -214,7 +216,7 @@ def build_checker_framework_release(version: str, old_cf_version: str) -> None:
214216

215217
dev_website_relative_dir = Path(DEV_SITE_DIR) / "releases" / version
216218
print(f"Copying from: {dev_website_relative_dir}\n to: {DEV_SITE_DIR}")
217-
copy_tree(dev_website_relative_dir, DEV_SITE_DIR)
219+
copy_tree(str(dev_website_relative_dir), str(DEV_SITE_DIR))
218220

219221

220222
def commit_to_interm_projects(cf_version: str) -> None:
@@ -312,7 +314,7 @@ def main(argv: list[str]) -> None:
312314

313315
# The Checker Framework jar files and documentation are built and the website is updated.
314316
print_step("Build Step 5: Build projects and websites.") # AUTO
315-
build_checker_framework_release(cf_version, old_cf_version)
317+
build_checker_framework_release(cf_version, old_cf_version, checker_framework_interm_dir)
316318

317319
print_step("Build Step 6: Overwrite .htaccess and CFLogo.png .") # AUTO
318320

@@ -336,11 +338,9 @@ def main(argv: list[str]) -> None:
336338
ensure_group_access(CHECKER_FRAMEWORK)
337339
ensure_group_access(INTERM_CHECKER_REPO)
338340

339-
# At the moment, this will lead to output error messages because some metadata in some of the
340-
# dirs I think is owned by Mike or Werner. We should identify these and have them fix it.
341-
# But as long as the processes return a zero exit status, we should be ok.
342341
print_step("\n\nBuild Step 9: Add group permissions to websites.") # AUTO
343-
ensure_group_access(DEV_SITE_DIR)
342+
## TODO: This is returning a status of 1, but it runs fine from the command line.
343+
# ensure_group_access(DEV_SITE_DIR)
344344

345345
create_empty_file(RELEASE_BUILD_COMPLETED_FLAG_FILE)
346346

docs/developer/release/release_push.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,7 @@ def run_link_checker(site: str, output_file: Path, additional_param: str = "") -
166166
Additional parameters (if given) are passed directly to the link checker script.
167167
168168
Returns:
169-
the given output file
170-
171-
Raises:
172-
Exception: If the user bails out.
169+
The given output file.
173170
"""
174171
delete_if_exists(output_file)
175172
check_links_script = Path(SCRIPTS_DIR) / "checkLinks.sh"
@@ -192,15 +189,6 @@ def run_link_checker(site: str, output_file: Path, additional_param: str = "") -
192189
process.wait()
193190
out_file.close()
194191

195-
if process.returncode != 0:
196-
msg = (
197-
f"Non-zero return code ({process.returncode};"
198-
f" see output in {output_file}) while executing {cmd}"
199-
)
200-
print(msg + "\n")
201-
if not prompt_yes_no("Continue despite link checker results?", True):
202-
raise Exception(msg)
203-
204192
return output_file
205193

206194

0 commit comments

Comments
 (0)