Name native installers like the portable zip (version + OS/arch)#7630
Open
karianna wants to merge 1 commit into
Open
Name native installers like the portable zip (version + OS/arch)#7630karianna wants to merge 1 commit into
karianna wants to merge 1 commit into
Conversation
jpackage names native installers using its sanitised numeric appVersion
with no platform suffix (e.g. pcgen-6.09.08.dmg). For nightly builds this
drops the -NIGHTLY.<date> qualifier and the OS/arch, so the installers look
like official releases and can't be told apart by platform. The portable
zip already encodes the full version + os + arch, so the two are
inconsistent.
Rename the native installers (.dmg/.exe/.deb, plus .msi/.rpm defensively)
as assembleArtifacts copies them into build/release so they mirror the
portable zip: pcgen-<version>-<hostOs>-<hostArch>.<ext>. This is a
filename-only change -- jpackage's internal appVersion stays the sanitised
numeric value (required by dmg/exe/deb), so installers still install
correctly.
- build.gradle: publish project.ext.hostOs/hostArch so the separately
applied release.gradle can read them (the local defs aren't visible there).
- code/gradle/release.gradle: add a configuration-cache-safe rename {} to
assembleArtifacts; the portable zip and sources jar are left untouched.
- AGENTS.md: document the installer filename convention.
Applies to all builds (nightly, release, release-manual); no workflow
changes are needed since they upload build/release/* by wildcard.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
jpackagenames the native installers using its sanitised numericappVersionwith no platform suffix — e.g.pcgen-6.09.08.dmg. For nightly builds the human-readable version (6.09.08.RC1-NIGHTLY.20260624) is stripped down to6.09.08, so the installer:-NIGHTLY.<date>qualifier (it looks like an official6.09.08release), andMeanwhile the portable zip is already named
pcgen-<version>-<os>-<arch>-portable.zip, so the two artifact types are inconsistent.This renames the native installers (
.dmg/.exe/.deb, plus.msi/.rpmdefensively) asassembleArtifactscopies them intobuild/release, so they mirror the portable zip:pcgen-6.09.08.dmgpcgen-6.09.08.RC1-NIGHTLY.20260624-mac-aarch64.dmgpcgen-6.09.08.dmgpcgen-6.09.08-mac-aarch64.dmgThis is a filename-only change. jpackage's internal
appVersionstays the sanitised numeric value (6.09.08) — native installer formats (dmg/exe/deb) require a strictly numeric version — so installers still install correctly. Only the downloadable filename changes.Changes
build.gradle— publishproject.ext.hostOs/project.ext.hostArchso the separately-appliedrelease.gradlecan read them (the localdefs aren't visible there).code/gradle/release.gradle— add a configuration-cache-saferename {}toassembleArtifactsthat rewrites*.dmg/.exe/.msi/.deb/.rpm→pcgen-<version>-<hostOs>-<hostArch>.<ext>; the portable zip and sources jar pass through untouched.AGENTS.md— document the convention.Scope & compatibility
.dmg/.execarried no arch before, so adding-<os>-<arch>also future-proofs against filename collisions if a second arch per OS is ever added.build/release/*by wildcard..debbecomes hyphenated (pcgen-<version>-linux-<arch>.deb) instead of Debian'sname_version_arch.deb; fine for standalone GitHub release assets (revisit only if an apt repo is introduced).Testing
./gradlew :assembleArtifacts --dry-runconfigures cleanly; theexthost tokens resolve inrelease.gradle(config cache is only disabled by the pre-existing:buildDashboardtask, unrelated to this change).Copyexercising the exactrename {}closure produced the expected filenames at runtime.