Skip to content

Commit ef868fa

Browse files
fix: Temporary fix for MacOS validator app corruption (#1186)
* Include Mac OS .app in installer artifact. * Use temurin jdk distro, drop .app from package. * Don't create the app dmg in gradle. Instead, create an unsigned bundle in github workflow. * Add a comment. * Switch back to zulu distro. Co-authored-by: Maxime Armstrong <[email protected]>
1 parent 41f8211 commit ef868fa

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

.github/workflows/package_installers.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,19 @@ jobs:
4444
uses: gradle/gradle-build-action@v2
4545
with:
4646
arguments: jpackage
47+
# Per discussion in https://github.com/MobilityData/gtfs-validator/issues/1183, there is a
48+
# bug with jpackage in Java 17 that caused Mac apps to be left in an ambiguous signing state
49+
# that results in them being reported as 'damaged' when run. As a temporary workaround, we
50+
# unsign the app and repackage as a dmg. This bug could be fixed in the future by upgrading
51+
# to Java 18 or by officially signing the app.
52+
- name: Unsign and package Mac OS app
53+
if: matrix.os == 'macos-latest'
54+
shell: bash
55+
run: |
56+
codesign --remove-signature app/pkg/build/jpackage/GTFS\ Validator.app
57+
appVersion=$(./gradlew cV -q -Prelease.quiet)
58+
appVersion=${appVersion//-SNAPSHOT/}
59+
jpackage --type dmg --name 'GTFS Validator' --app-version ${appVersion} --app-image app/pkg/build/jpackage/GTFS\ Validator.app --dest app/pkg/build/jpackage
4760
- name: Upload Installer
4861
uses: actions/upload-artifact@v2
4962
with:

app/pkg/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ jlink {
111111
imageOptions = [
112112
'--icon', "${projectDir}/src/main/icons/Icon.icns"
113113
]
114+
skipInstaller = true
114115
}
115116
}
116117
}

0 commit comments

Comments
 (0)