Skip to content

Commit b536380

Browse files
committed
fix(release): enforce macOS-compatible jpackage appVersion normalization
Map jpackage appVersion to a SemVer triplet with optional v-prefix support. Enforce appVersion major >= 1 to satisfy macOS jpackage constraints. Document the workaround as temporary and remove it at the first real v1.x release.
1 parent a8bfd79 commit b536380

5 files changed

Lines changed: 15 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ The changelog is grouped by release tags (`vX.Y.Z`) and includes an `Unreleased`
77
## Unreleased
88

99
### Build and Test
10+
- ✅ Fixed demo jpackage app-version normalization for macOS runners by enforcing a major-version floor of `1` (for example `0.4.1-*` becomes `1.4.1` for packaging), resolving `jpackageImage` failures in the release matrix.
1011
- ✅ Expanded the release workflow into a multi-job pipeline with a Windows/macOS/Linux matrix for demo `jpackage` ZIP assets, and centralized final release publishing from aggregated artifacts.
1112
- ✅ Added `org.beryx.jlink` demo packaging baseline in `snapfx-demo` with `jlink`, `jpackageImage`, and `packageJPackageImageZip`, including jpackage-safe version normalization for git-derived dev versions and OS-specific app icon selection (`snapfx.ico`/`snapfx.icns`/`snapfx.png`).
1213
- ✅ Aligned release workflow build tasks and artifact upload paths with split modules (`:snapfx-demo:distZip`/`:distTar`, `snapfx-demo/build/distributions/*`, `snapfx-core/build/libs/*`).

DONE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ SnapFX has been fully implemented with core functionality and is production-read
289289
- ✅ Added GitHub Actions release workflow for `v*` tags that runs build/tests and publishes GitHub Releases with distribution artifacts.
290290
- ✅ Aligned release workflow build tasks and artifact upload paths with split modules (`:snapfx-demo:distZip`/`:distTar`, `snapfx-demo/build/distributions/*`, `snapfx-core/build/libs/*`)
291291
- ✅ Extended the release workflow with a cross-platform matrix that builds demo `jpackage` ZIP assets on Windows/macOS/Linux and publishes them with OS-specific filenames.
292-
- ✅ Added `org.beryx.jlink` demo packaging baseline in `snapfx-demo` (`jlink`, `jpackageImage`, and `packageJPackageImageZip`) with jpackage-safe version normalization for git-derived dev versions and OS-specific app icon wiring (`snapfx.ico`/`snapfx.icns`/`snapfx.png`)
292+
- ✅ Added `org.beryx.jlink` demo packaging baseline in `snapfx-demo` (`jlink`, `jpackageImage`, and `packageJPackageImageZip`) with jpackage-safe version normalization for git-derived dev versions (including a temporary macOS-compatible app-version major floor `1`, planned to be removed at first `v1.x`) and OS-specific app icon wiring (`snapfx.ico`/`snapfx.icns`/`snapfx.png`)
293293
- ✅ Added `git-cliff` release-note generation (`cliff.toml`) and wired release workflow to publish generated notes.
294294
- ✅ Tracked `gradlew` as executable (`100755`) so Linux CI/release runners can execute the Gradle wrapper reliably.
295295
- ✅ Added `xvfb-run -a` to CI/release Gradle test execution so JavaFX tests run reliably on headless Linux runners.

ROADMAP.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,8 @@ This roadmap keeps a high-level progress view plus planned/proposed work; detail
404404
-**Maven publish dry-run baseline (`snapfx-core`)**: `maven-publish` + optional signing wiring, `sourcesJar`/`javadocJar`, and POM metadata are in place; local `:snapfx-core:publishToMavenLocal` succeeds
405405
- 📋 **Maven Central**: Publish to Maven Central
406406
-**jlink support baseline**: `snapfx-demo` now uses `org.beryx.jlink` and provides `:snapfx-demo:jlink` runtime-image packaging
407-
- 🚧 **jpackage support baseline**: `snapfx-demo` now provides `:snapfx-demo:jpackageImage` and `:snapfx-demo:packageJPackageImageZip` with OS-specific app icon selection (`.ico`/`.icns`/`.png`), and release automation now publishes per-OS demo ZIP assets (Windows/macOS/Linux); installer generation/signing remains pending
407+
- 🚧 **jpackage support baseline**: `snapfx-demo` now provides `:snapfx-demo:jpackageImage` and `:snapfx-demo:packageJPackageImageZip` with OS-specific app icon selection (`.ico`/`.icns`/`.png`) plus macOS-compatible app-version normalization (major version floor `1`), and release automation now publishes per-OS demo ZIP assets (Windows/macOS/Linux); installer generation/signing remains pending
408+
- 📋 **Remove temporary macOS appVersion workaround at v1.x**: After the first real `v1.x` project release, drop the major-floor mapping so demo appVersion equals the core/project version again.
408409
- 📋 **Version management**: Semantic versioning
409410

410411
**Estimated Time**: 2-3 days

STATUS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
**CI Module-Split Alignment**: Critical stability suites now run `:snapfx-core:test` with `org.snapfx...` test filters
1616
**Release Module-Split Alignment**: Tag release workflow now builds `:snapfx-demo` distributions explicitly and publishes artifacts from split module output paths
17-
**Demo Runtime Packaging Baseline**: `org.beryx.jlink` now configures `:snapfx-demo:jlink`, `:snapfx-demo:jpackageImage`, and `:snapfx-demo:packageJPackageImageZip`, including OS-specific app icons (`.ico`/`.icns`/`.png`)
17+
**Demo Runtime Packaging Baseline**: `org.beryx.jlink` now configures `:snapfx-demo:jlink`, `:snapfx-demo:jpackageImage`, and `:snapfx-demo:packageJPackageImageZip`, including OS-specific app icons (`.ico`/`.icns`/`.png`) and a temporary macOS-compatible jpackage app-version normalization (major version floor `1`, planned removal at first `v1.x` release)
1818
**Cross-Platform Demo Release Assets**: Tag releases now build `jpackage` demo ZIPs on Windows/macOS/Linux and publish them with deterministic OS-specific filenames (`snapfx-demo-jpackage-image-<os>-<tag>.zip`)
1919

2020
## Documentation Scope

snapfx-demo/build.gradle.kts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,17 @@ plugins {
77
val javafxModules = listOf("javafx.controls")
88
val javaVersion = JavaVersion.VERSION_21
99
val javafxRuntimeVersion = javaVersion.majorVersion
10-
val normalizedJPackageVersion = Regex("""^\d+\.\d+\.\d+""")
10+
val normalizedJPackageVersion = Regex("""^v?(\d+)\.(\d+)\.(\d+)""")
1111
.find(project.version.toString())
12-
?.value
13-
?: "0.0.0"
12+
?.destructured
13+
?.let { (major, minor, patch) ->
14+
// macOS jpackage requires appVersion major >= 1.
15+
// TODO(v1): Remove this major-floor workaround after the first real v1.x release,
16+
// so demo appVersion matches the core/project version again.
17+
val appMajor = major.toIntOrNull()?.coerceAtLeast(1) ?: 1
18+
"$appMajor.$minor.$patch"
19+
}
20+
?: "1.0.0"
1421
val jpackageIconFileName = when {
1522
System.getProperty("os.name").lowercase().contains("win") -> "snapfx.ico"
1623
System.getProperty("os.name").lowercase().contains("mac") -> "snapfx.icns"

0 commit comments

Comments
 (0)