fix: make sure platform binary exists (#7676)
This commit is contained in:
@@ -134,7 +134,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
source ./bin/activate-hermit
|
source ./bin/activate-hermit
|
||||||
cd ui/desktop
|
cd ui/desktop
|
||||||
npm install
|
npm ci
|
||||||
# Verify installation
|
# Verify installation
|
||||||
ls -la node_modules/.bin/ | head -5
|
ls -la node_modules/.bin/ | head -5
|
||||||
|
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd ui/desktop
|
cd ui/desktop
|
||||||
|
|
||||||
npm install
|
npm ci
|
||||||
node scripts/build-main.js
|
node scripts/build-main.js
|
||||||
node scripts/prepare-platform-binaries.js
|
node scripts/prepare-platform-binaries.js
|
||||||
npm run make -- --platform=win32 --arch=x64
|
npm run make -- --platform=win32 --arch=x64
|
||||||
|
|||||||
@@ -151,6 +151,10 @@ jobs:
|
|||||||
# restore-keys: |
|
# restore-keys: |
|
||||||
# ci-npm-cache-v1-${{ runner.os }}-
|
# ci-npm-cache-v1-${{ runner.os }}-
|
||||||
|
|
||||||
|
- name: Check lockfile has cross-platform entries
|
||||||
|
run: ./scripts/check-lockfile-platforms.sh
|
||||||
|
working-directory: ui/desktop
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: source ../../bin/activate-hermit && npm ci
|
run: source ../../bin/activate-hermit && npm ci
|
||||||
working-directory: ui/desktop
|
working-directory: ui/desktop
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ copy-binary-windows:
|
|||||||
run-ui:
|
run-ui:
|
||||||
@just release-binary
|
@just release-binary
|
||||||
@echo "Running UI..."
|
@echo "Running UI..."
|
||||||
cd ui/desktop && npm install && npm run start-gui
|
cd ui/desktop && npm ci && npm run start-gui
|
||||||
|
|
||||||
run-ui-playwright:
|
run-ui-playwright:
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
@@ -138,14 +138,14 @@ run-ui-playwright:
|
|||||||
|
|
||||||
run-ui-only:
|
run-ui-only:
|
||||||
@echo "Running UI..."
|
@echo "Running UI..."
|
||||||
cd ui/desktop && npm install && npm run start-gui
|
cd ui/desktop && npm ci && npm run start-gui
|
||||||
|
|
||||||
debug-ui *alpha:
|
debug-ui *alpha:
|
||||||
@echo "🚀 Starting goose frontend in external backend mode{{ if alpha == "alpha" { " with alpha features enabled" } else { "" } }}"
|
@echo "🚀 Starting goose frontend in external backend mode{{ if alpha == "alpha" { " with alpha features enabled" } else { "" } }}"
|
||||||
cd ui/desktop && \
|
cd ui/desktop && \
|
||||||
export GOOSE_EXTERNAL_BACKEND=true && \
|
export GOOSE_EXTERNAL_BACKEND=true && \
|
||||||
{{ if alpha == "alpha" { "export ALPHA=true &&" } else { "" } }} \
|
{{ if alpha == "alpha" { "export ALPHA=true &&" } else { "" } }} \
|
||||||
npm install && \
|
npm ci && \
|
||||||
npm run {{ if alpha == "alpha" { "start-alpha-gui" } else { "start-gui" } }}
|
npm run {{ if alpha == "alpha" { "start-alpha-gui" } else { "start-gui" } }}
|
||||||
|
|
||||||
# Run UI with main process debugging enabled
|
# Run UI with main process debugging enabled
|
||||||
@@ -159,7 +159,7 @@ debug-ui-main-process:
|
|||||||
@echo "🔍 Starting goose UI with main process debugging enabled"
|
@echo "🔍 Starting goose UI with main process debugging enabled"
|
||||||
@just release-binary
|
@just release-binary
|
||||||
cd ui/desktop && \
|
cd ui/desktop && \
|
||||||
npm install && \
|
npm ci && \
|
||||||
npm run start-gui-debug
|
npm run start-gui-debug
|
||||||
|
|
||||||
# Package the desktop app locally for testing (macOS)
|
# Package the desktop app locally for testing (macOS)
|
||||||
@@ -167,7 +167,7 @@ debug-ui-main-process:
|
|||||||
package-ui:
|
package-ui:
|
||||||
@just release-binary
|
@just release-binary
|
||||||
@echo "Packaging desktop app..."
|
@echo "Packaging desktop app..."
|
||||||
cd ui/desktop && npm install && npm run package
|
cd ui/desktop && npm ci && npm run package
|
||||||
@echo "Signing with entitlements..."
|
@echo "Signing with entitlements..."
|
||||||
codesign --force --deep --sign - --entitlements ui/desktop/entitlements.plist ui/desktop/out/Goose-darwin-arm64/Goose.app
|
codesign --force --deep --sign - --entitlements ui/desktop/entitlements.plist ui/desktop/out/Goose-darwin-arm64/Goose.app
|
||||||
@echo "Done! Launch with: open ui/desktop/out/Goose-darwin-arm64/Goose.app"
|
@echo "Done! Launch with: open ui/desktop/out/Goose-darwin-arm64/Goose.app"
|
||||||
@@ -176,14 +176,14 @@ package-ui:
|
|||||||
run-ui-alpha:
|
run-ui-alpha:
|
||||||
@just release-binary
|
@just release-binary
|
||||||
@echo "Running UI with alpha features..."
|
@echo "Running UI with alpha features..."
|
||||||
cd ui/desktop && npm install && ALPHA=true npm run start-alpha-gui
|
cd ui/desktop && npm ci && ALPHA=true npm run start-alpha-gui
|
||||||
|
|
||||||
# Run UI with latest (Windows version)
|
# Run UI with latest (Windows version)
|
||||||
run-ui-windows:
|
run-ui-windows:
|
||||||
@just release-windows
|
@just release-windows
|
||||||
@powershell.exe -Command "Write-Host 'Copying Windows binary...'"
|
@powershell.exe -Command "Write-Host 'Copying Windows binary...'"
|
||||||
@just copy-binary-windows
|
@just copy-binary-windows
|
||||||
@powershell.exe -Command "Write-Host 'Running UI...'; Set-Location ui/desktop; npm install; npm run start-gui"
|
@powershell.exe -Command "Write-Host 'Running UI...'; Set-Location ui/desktop; npm ci; npm run start-gui"
|
||||||
|
|
||||||
# Run Docusaurus server for documentation
|
# Run Docusaurus server for documentation
|
||||||
run-docs:
|
run-docs:
|
||||||
@@ -386,7 +386,7 @@ win-bld-rls-all:
|
|||||||
|
|
||||||
### Install npm stuff
|
### Install npm stuff
|
||||||
win-app-deps:
|
win-app-deps:
|
||||||
cd ui{{s}}desktop ; npm install
|
cd ui{{s}}desktop ; npm ci
|
||||||
|
|
||||||
### Windows copy {release|debug} files to ui\desktop\src\bin
|
### Windows copy {release|debug} files to ui\desktop\src\bin
|
||||||
### s = os dependent file separator
|
### s = os dependent file separator
|
||||||
|
|||||||
Generated
+1072
-338
File diff suppressed because it is too large
Load Diff
@@ -56,7 +56,7 @@
|
|||||||
"@radix-ui/react-slot": "^1.2.4",
|
"@radix-ui/react-slot": "^1.2.4",
|
||||||
"@radix-ui/react-tabs": "^1.1.13",
|
"@radix-ui/react-tabs": "^1.1.13",
|
||||||
"@radix-ui/themes": "^3.3.0",
|
"@radix-ui/themes": "^3.3.0",
|
||||||
"@tanstack/react-form": "^1.28.3",
|
"@tanstack/react-form": "1.28.3",
|
||||||
"@types/react-router-dom": "^5.3.3",
|
"@types/react-router-dom": "^5.3.3",
|
||||||
"class-variance-authority": "^0.7.1",
|
"class-variance-authority": "^0.7.1",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
"electron-window-state": "^5.0.3",
|
"electron-window-state": "^5.0.3",
|
||||||
"express": "^5.2.1",
|
"express": "^5.2.1",
|
||||||
"framer-motion": "^12.34.3",
|
"framer-motion": "^12.34.3",
|
||||||
"katex": "^0.16.33",
|
"katex": "0.16.33",
|
||||||
"lodash": "^4.17.23",
|
"lodash": "^4.17.23",
|
||||||
"lucide-react": "^0.575.0",
|
"lucide-react": "^0.575.0",
|
||||||
"qrcode.react": "^4.2.0",
|
"qrcode.react": "^4.2.0",
|
||||||
@@ -110,7 +110,7 @@
|
|||||||
"@electron/fuses": "^1.8.0",
|
"@electron/fuses": "^1.8.0",
|
||||||
"@electron/remote": "^2.1.3",
|
"@electron/remote": "^2.1.3",
|
||||||
"@eslint/js": "^9.39.2",
|
"@eslint/js": "^9.39.2",
|
||||||
"@hey-api/openapi-ts": "^0.93.0",
|
"@hey-api/openapi-ts": "0.93.0",
|
||||||
"@modelcontextprotocol/sdk": "^1.27.0",
|
"@modelcontextprotocol/sdk": "^1.27.0",
|
||||||
"@playwright/test": "^1.58.2",
|
"@playwright/test": "^1.58.2",
|
||||||
"@tailwindcss/line-clamp": "^0.4.4",
|
"@tailwindcss/line-clamp": "^0.4.4",
|
||||||
|
|||||||
+30
@@ -0,0 +1,30 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Verify package-lock.json has cross-platform optional dependency entries.
|
||||||
|
#
|
||||||
|
# npm has a bug where running `npm install` with an existing node_modules/
|
||||||
|
# prunes platform-specific entries from the lockfile, breaking CI on other platforms.
|
||||||
|
# See: https://github.com/npm/cli/issues/4828
|
||||||
|
#
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
LOCKFILE="${1:-package-lock.json}"
|
||||||
|
|
||||||
|
fail=0
|
||||||
|
grep -q '"node_modules/@esbuild/win32-x64"' "$LOCKFILE" || { echo "MISSING: @esbuild/win32-x64"; fail=1; }
|
||||||
|
grep -q '"node_modules/@esbuild/linux-x64"' "$LOCKFILE" || { echo "MISSING: @esbuild/linux-x64"; fail=1; }
|
||||||
|
|
||||||
|
if [ "$fail" -eq 1 ]; then
|
||||||
|
echo ""
|
||||||
|
echo "ERROR: package-lock.json is missing cross-platform optional dependencies."
|
||||||
|
echo "This happens when 'npm install' is run with an existing node_modules/ directory."
|
||||||
|
echo ""
|
||||||
|
echo "To fix, run from ui/desktop/:"
|
||||||
|
echo " rm -rf node_modules package-lock.json"
|
||||||
|
echo " npm install"
|
||||||
|
echo ""
|
||||||
|
echo "Then commit the regenerated package-lock.json."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "OK: package-lock.json has cross-platform entries"
|
||||||
Reference in New Issue
Block a user