Enhance build configuration for macOS and update artifact naming #22
6
.github/workflows/build.yml
vendored
@@ -80,10 +80,10 @@ jobs:
|
||||
release_artifacts: "dist/*-win-installer.exe,dist/*-win-portable.exe"
|
||||
build_input: build_windows
|
||||
- name: mac
|
||||
os: macos-13
|
||||
os: macos-14
|
||||
node: 18
|
||||
python: "3.11"
|
||||
release_artifacts: "dist/*-mac.dmg"
|
||||
release_artifacts: "dist/*-mac-*.dmg"
|
||||
build_input: build_mac
|
||||
- name: linux
|
||||
os: ubuntu-latest
|
||||
@@ -173,7 +173,7 @@ jobs:
|
||||
mv dist/*.whl python-dist/
|
||||
rm -rf dist
|
||||
|
||||
- name: Build Electron App
|
||||
- name: Build Electron App (Universal)
|
||||
if: |
|
||||
github.event_name == 'push' ||
|
||||
(github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true)
|
||||
|
||||
13
package.json
@@ -12,7 +12,9 @@
|
||||
"electron-postinstall": "electron-builder install-app-deps",
|
||||
"electron": "npm run electron-postinstall && npm run build && electron .",
|
||||
"dist": "npm run electron-postinstall && npm run build && electron-builder --publish=never",
|
||||
"dist-prebuilt": "npm run electron-postinstall && npm run build-backend && electron-builder --publish=never"
|
||||
"dist-prebuilt": "npm run electron-postinstall && npm run build-backend && electron-builder --publish=never",
|
||||
"dist:mac-arm64": "npm run electron-postinstall && npm run build && electron-builder --mac --arm64 --publish=never",
|
||||
"dist:mac-universal": "npm run electron-postinstall && npm run build && electron-builder --mac --universal --publish=never"
|
||||
},
|
||||
|
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -36,9 +38,14 @@
|
||||
"buildResources": "electron/build"
|
||||
|
β οΈ Potential issue | π΄ Critical π§© Analysis chainπ Script executed: Repository: Sudo-Ivan/reticulum-meshchatX Length of output: 55 π Script executed: Repository: Sudo-Ivan/reticulum-meshchatX Length of output: 91 π Script executed: Repository: Sudo-Ivan/reticulum-meshchatX Length of output: 100 π Script executed: Repository: Sudo-Ivan/reticulum-meshchatX Length of output: 55 π Script executed: Repository: Sudo-Ivan/reticulum-meshchatX Length of output: 145 π Script executed: Repository: Sudo-Ivan/reticulum-meshchatX Length of output: 789 π Script executed: Repository: Sudo-Ivan/reticulum-meshchatX Length of output: 91 π Script executed: Repository: Sudo-Ivan/reticulum-meshchatX Length of output: 1127 π Script executed: Repository: Sudo-Ivan/reticulum-meshchatX Length of output: 561 π Script executed: Repository: Sudo-Ivan/reticulum-meshchatX Length of output: 55 π Script executed: Repository: Sudo-Ivan/reticulum-meshchatX Length of output: 55 π Script executed: Repository: Sudo-Ivan/reticulum-meshchatX Length of output: 520 π Script executed: Repository: Sudo-Ivan/reticulum-meshchatX Length of output: 1312 π Script executed: Repository: Sudo-Ivan/reticulum-meshchatX Length of output: 455 π Web query:
π‘ Result: In electron-builder the ${os} placeholder for macOS equals "darwin". [1][2] Sources: Critical artifact naming mismatch: The π€ Prompt for AI Agents_β οΈ Potential issue_ | _π΄ Critical_
<details>
<summary>π§© Analysis chain</summary>
π Script executed:
```shell
# Search for hardcoded assumptions about artifact names in scripts
rg -nP 'ReticulumMeshChat.*\-mac' --type sh --type js --type json
```
Repository: Sudo-Ivan/reticulum-meshchatX
Length of output: 55
---
π Script executed:
```shell
# Also search for workflow files and patterns
fd -e yml -e yaml | head -20
```
Repository: Sudo-Ivan/reticulum-meshchatX
Length of output: 91
---
π Script executed:
```shell
# Check if there are references to the workflow pattern mentioned (line 86)
rg -nP 'dist/\*-mac-\*\.dmg' --type yml --type yaml
```
Repository: Sudo-Ivan/reticulum-meshchatX
Length of output: 100
---
π Script executed:
```shell
# Search for electron-builder configuration files
fd -e js -e json -e yml -e yaml | xargs rg -l 'electron-builder\|artifactName' | head -20
```
Repository: Sudo-Ivan/reticulum-meshchatX
Length of output: 55
---
π Script executed:
```shell
# Check repository structure
git ls-files | grep -E "(package\.json|workflow|\.github)" | head -20
```
Repository: Sudo-Ivan/reticulum-meshchatX
Length of output: 145
---
π Script executed:
```shell
# Read package.json to verify line 48
cat -n package.json | sed -n '40,60p'
```
Repository: Sudo-Ivan/reticulum-meshchatX
Length of output: 789
---
π Script executed:
```shell
# Find all workflow files
fd -e yaml -e yml 2>/dev/null | head -20
```
Repository: Sudo-Ivan/reticulum-meshchatX
Length of output: 91
---
π Script executed:
```shell
# Read the build.yml workflow file, focusing around line 86
cat -n .github/workflows/build.yml | sed -n '75,100p'
```
Repository: Sudo-Ivan/reticulum-meshchatX
Length of output: 1127
---
π Script executed:
```shell
# Also check for any dist pattern references in workflow
rg -n 'dist/.*\*' .github/workflows/build.yml
```
Repository: Sudo-Ivan/reticulum-meshchatX
Length of output: 561
---
π Script executed:
```shell
# Search for any artifact upload or download steps
rg -n -A 2 -B 2 'artifacts\|dist' .github/workflows/build.yml | head -40
```
Repository: Sudo-Ivan/reticulum-meshchatX
Length of output: 55
---
π Script executed:
```shell
# Check if there are any build artifacts or examples showing actual filenames
find . -name "*.dmg" -o -name "*darwin*" -o -name "*mac*" 2>/dev/null | grep -i artifact | head -20
```
Repository: Sudo-Ivan/reticulum-meshchatX
Length of output: 55
---
π Script executed:
```shell
# Search for electron-builder configuration and ${os} variable usage
rg -n '\$\{os\}' --type json --type js
```
Repository: Sudo-Ivan/reticulum-meshchatX
Length of output: 520
---
π Script executed:
```shell
# Check the entire mac configuration in package.json
cat -n package.json | sed -n '35,75p'
```
Repository: Sudo-Ivan/reticulum-meshchatX
Length of output: 1312
---
π Script executed:
```shell
# Look for any build scripts or documentation about artifact naming
rg -n 'artifact' package.json
```
Repository: Sudo-Ivan/reticulum-meshchatX
Length of output: 455
---
π Web query:
`electron-builder ${os} variable macOS darwin value`
π‘ Result:
In electron-builder the ${os} placeholder for macOS equals "darwin". [1][2]
Sources:
[1] electron-builder docs β Configuration / Common Configuration.
[2] electron-builder docs (variable substitution summary).
---
</details>
**Critical artifact naming mismatch: `${os}` resolves to "darwin" but workflow patterns expect "mac".**
The `artifactName` change in package.json (line 48) uses `${os}` which electron-builder resolves to `"darwin"` for macOS, producing filenames like `ReticulumMeshChat-v{version}-darwin-universal.dmg`. However, the workflow patterns at lines 86 and 192 expect `dist/*-mac-*.dmg` and `dist/*-mac.dmg` respectively, which will not match the generated artifacts. Either update the artifactName to use a hardcoded "mac" string instead of `${os}`, or update the workflow patterns to expect "darwin-*" for the macOS artifacts.
<details>
<summary>π€ Prompt for AI Agents</summary>
```
In package.json around line 48, the artifactName uses ${os} which resolves to
"darwin" for macOS, but CI workflow patterns expect "mac", causing mismatched
artifact names; fix by replacing ${os} with a hardcoded "mac" in artifactName
(e.g., ReticulumMeshChat-v${version}-mac-${arch}.${ext}) or alternatively update
the workflow glob patterns at the referenced workflow lines to match "darwin"
(e.g., change dist/*-mac-*.dmg to dist/*-darwin-*.dmg and dist/*-mac.dmg to
dist/*-darwin.dmg) so artifact names and workflow expectations align.
```
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
β
Addressed in commits c95d2fd to d69a3e8
|
||||
},
|
||||
"mac": {
|
||||
"target": "dmg",
|
||||
"target": {
|
||||
"target": "dmg",
|
||||
"arch": [
|
||||
"universal"
|
||||
]
|
||||
},
|
||||
"identity": null,
|
||||
"artifactName": "ReticulumMeshChat-v${version}-${os}.${ext}",
|
||||
"artifactName": "ReticulumMeshChat-v${version}-${os}-${arch}.${ext}",
|
||||
"extendInfo": {
|
||||
"NSMicrophoneUsageDescription": "Microphone access is only needed for Audio Calls",
|
||||
"com.apple.security.device.audio-input": true
|
||||
|
||||
β οΈ Potential issue | π Major
New
dist:mac-arm64anddist:mac-universalscripts are unused by the workflow.Three distribution scripts now exist:
dist: full build for current platform (used by legacy code)dist-prebuilt: skips frontend, used by workflow for ALL platformsdist:mac-arm64&dist:mac-universal: architecture-specific, but never invokedThe workflow always calls
npm run dist-prebuiltregardless of platform, so the new macOS-specific scripts with explicit architecture targets are dead code. This defeats the purpose of offering architecture-specific builds.Either:
If option 1, update
.github/workflows/build.ymlline 180 to:π€ Prompt for AI Agents
β Addressed in commits
c95d2fdtod69a3e8