Skip to content

Prepare RC: write generated Maven settings outside the repo - #3763

Merged
Fokko merged 2 commits into
apache:masterfrom
RussellSpitzer:fix/prepare-rc-rat-check
Sep 4, 2026
Merged

Fokko merged 2 commits into
apache:masterfrom
RussellSpitzer:fix/prepare-rc-rat-check

Conversation

@RussellSpitzer

Copy link
Copy Markdown
Member

Rationale for this change

Before we were making a temporary .release-settings.xml in the working directory. This caused RAT to fail since the temp file was not licensed correctly.

Now we use mktemp under RUNNER_TEMP (with TMPDIR / /tmp fallbacks) so the file lives outside the tree RAT scans, and guard the EXIT trap with ${settings_file:-} in case the script exits before the variable is set.

What changes are included in this PR?

Changes the position of the temporary file

Are these changes tested?

Only locally, made sure the file writes outside of the working directory

Are there any user-facing changes?

No

.release-settings.xml was created in the repo root before mvn deploy
-Papache-release ran, which activates the RAT check. RAT flagged the
generated file for a missing ASF license header and failed the deploy.

Use mktemp under RUNNER_TEMP (with TMPDIR / /tmp fallbacks) so the file
lives outside the tree RAT scans, and guard the EXIT trap with
${settings_file:-} in case the script exits before the variable is set.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Comment thread release/bin/prepare-rc.sh Outdated
Co-authored-by: Fokko Driesprong <fokko@apache.org>
@Fokko
Fokko merged commit fb64102 into apache:master Sep 4, 2026
6 checks passed
@Fokko

Fokko commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Thanks again @RussellSpitzer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants