Skip to content

Commit 3720b16

Browse files
committed
fix: import loadView in menu.js and fix workflows specific cases
1 parent 112f810 commit 3720b16

2 files changed

Lines changed: 22 additions & 15 deletions

File tree

.github/workflows/build.yaml

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ jobs:
132132
with:
133133
workflow: build.yaml
134134
branch: production
135-
workflow_conclusion: success
135+
workflow_conclusion: "completed"
136136
name: backend-${{ matrix.platform }}
137137
path: backend-artifacts
138138
if_no_artifact_found: fail
@@ -157,24 +157,30 @@ jobs:
157157
# Aggregate download results
158158
aggregate-downloads:
159159
name: Aggregate Download Results
160-
# It is important to use != 'true' and not == 'false' because if they are no defined
161-
# values for inputs they will be undefined which gives false for any condition
162-
if: |
163-
always() &&
164-
(
165-
needs.detect-changes.outputs.backend_needs_rebuild != 'true' &&
166-
inputs.build-backend != 'true'
167-
)
160+
# Always run to ensure outputs are always available
161+
if: always()
168162
needs: [detect-changes, download-backend]
169163
runs-on: ubuntu-latest
170164
steps:
165+
- name: Set defaults if backend changed
166+
id: set-defaults
167+
run: |
168+
# If backend changed or build-backend is explicitly requested, set defaults and skip aggregation
169+
if [ "${{ needs.detect-changes.outputs.backend_needs_rebuild }}" = "true" ] || [ "${{ inputs.build-backend }}" = "true" ]; then
170+
echo "any_needs_rebuild=false" >> $GITHUB_OUTPUT
171+
echo 'result={"downloaded":{"linux":false,"windows":false,"macos-intel":false,"macos-arm64":false}}' >> $GITHUB_OUTPUT
172+
echo "Backend changed or build requested, using defaults"
173+
fi
174+
shell: bash
175+
171176
- uses: cloudposse/github-action-matrix-outputs-read@v1
172177
id: read
178+
if: needs.detect-changes.outputs.backend_needs_rebuild != 'true' && inputs.build-backend != 'true'
173179
with:
174180
matrix-step-name: download-backend
175181

176182
- name: Check if any platform needs rebuild
177-
if: always()
183+
if: needs.detect-changes.outputs.backend_needs_rebuild != 'true' && inputs.build-backend != 'true'
178184
id: check-rebuild
179185
run: |
180186
# Parse the result JSON to check if any download failed
@@ -215,9 +221,9 @@ jobs:
215221
echo "=== download-backend outcomes ==="
216222
echo "needs.download-backend.outcome: ${{ needs.download-backend.outcome }}"
217223
outputs:
218-
outcome: ${{ steps.read.outcome }}
219-
any_needs_rebuild: ${{ steps.check-rebuild.outputs.any_needs_rebuild }}
220-
result: ${{ steps.read.outputs.result }}
224+
outcome: ${{ steps.read.outcome != '' && steps.read.outcome || 'skipped' }}
225+
any_needs_rebuild: ${{ steps.check-rebuild.outputs.any_needs_rebuild != '' && steps.check-rebuild.outputs.any_needs_rebuild || steps.set-defaults.outputs.any_needs_rebuild || 'false' }}
226+
result: ${{ steps.read.outputs.result != '' && steps.read.outputs.result || steps.set-defaults.outputs.result || '{"downloaded":{"linux":false,"windows":false,"macos-intel":false,"macos-arm64":false}}' }}
221227

222228
# Build Go backends on native platforms
223229
# only if backend changed or download-backend failed
@@ -361,7 +367,7 @@ jobs:
361367
with:
362368
workflow: build.yaml
363369
branch: production
364-
workflow_conclusion: success
370+
workflow_conclusion: "completed"
365371
name: control-station
366372
path: control-station-artifacts
367373
if_no_artifact_found: fail
@@ -440,7 +446,7 @@ jobs:
440446
with:
441447
workflow: build.yaml
442448
branch: production
443-
workflow_conclusion: success
449+
workflow_conclusion: "completed"
444450
name: ethernet-view
445451
path: ethernet-view-artifacts
446452
if_no_artifact_found: fail

electron-app/src/menu/menu.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
getPacketSenderProcess,
1212
} from "../processes/packetSender.js";
1313
import fs from "fs";
14+
import { loadView } from "../windows/mainWindow.js";
1415

1516
/**
1617
* Creates and sets the application menu with File, View, Tools, and Help sections.

0 commit comments

Comments
 (0)