Skip to content

Name native installers like the portable zip (version + OS/arch)#7630

Open
karianna wants to merge 1 commit into
PCGen:masterfrom
karianna:karianna/rename-native-installers
Open

Name native installers like the portable zip (version + OS/arch)#7630
karianna wants to merge 1 commit into
PCGen:masterfrom
karianna:karianna/rename-native-installers

Conversation

@karianna

Copy link
Copy Markdown
Contributor

Summary

jpackage names the native installers using its sanitised numeric appVersion with 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 to 6.09.08, so the installer:

  • loses the -NIGHTLY.<date> qualifier (it looks like an official 6.09.08 release), and
  • carries no OS/arch.

Meanwhile 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/.rpm defensively) as assembleArtifacts copies them into build/release, so they mirror the portable zip:

Build Before After
Nightly pcgen-6.09.08.dmg pcgen-6.09.08.RC1-NIGHTLY.20260624-mac-aarch64.dmg
Official pcgen-6.09.08.dmg pcgen-6.09.08-mac-aarch64.dmg

This is a filename-only change. jpackage's internal appVersion stays 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 — publish project.ext.hostOs / project.ext.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 that rewrites *.dmg/.exe/.msi/.deb/.rpmpcgen-<version>-<hostOs>-<hostArch>.<ext>; the portable zip and sources jar pass through untouched.
  • AGENTS.md — document the convention.

Scope & compatibility

  • Applies to all builds (nightly, release, release-manual). The .dmg/.exe carried no arch before, so adding -<os>-<arch> also future-proofs against filename collisions if a second arch per OS is ever added.
  • No workflow changes needed — all three workflows upload build/release/* by wildcard.
  • The .deb becomes hyphenated (pcgen-<version>-linux-<arch>.deb) instead of Debian's name_version_arch.deb; fine for standalone GitHub release assets (revisit only if an apt repo is introduced).

Testing

  • Transform logic checked against representative filenames (dmg/exe/deb + portable zip + sources jar): installers renamed, zip/jar untouched.
  • ./gradlew :assembleArtifacts --dry-run configures cleanly; the ext host tokens resolve in release.gradle (config cache is only disabled by the pre-existing :buildDashboard task, unrelated to this change).
  • A standalone Gradle Copy exercising the exact rename {} closure produced the expected filenames at runtime.

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>
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.

1 participant