-
Notifications
You must be signed in to change notification settings - Fork 332
fix: fixed an error in the github-action build script #3828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Important Review skippedMore than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review. 191 files out of 299 files are above the max files limit of 100. Please upgrade to Pro plan to get higher limits. You can disable this status message by setting the WalkthroughThe changes modify the SVG-to-JavaScript build process by adding pre-generation cleanup of the icons source directory and updating the package.json build script to invoke a new command for SaaS icon preparation instead of the previous one. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
internals/automate/src/build-svg-to-js/index.ts(1 hunks)package.json(1 hunks)
🧰 Additional context used
🪛 GitHub Actions: Dispatch Alpha Ui--icon common
package.json
[warning] 1-1: Deprecation warning: The CJS build of Vite's Node API is deprecated.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: PR Unit Test
🔇 Additional comments (1)
internals/automate/src/build-svg-to-js/index.ts (1)
46-54: LGTM! Cleanup logic addresses build failures effectively.The pre-generation cleanup ensures a clean output directory by removing stale artifacts and recreating the directory structure. The error handling with
force: trueand try-catch is appropriate for a build script context.
| "build:runtime": "pnpm create:icon-saas && pnpm -C internals/cli build:runtime", | ||
| "// ---------- 构建相关脚本 ----------": "", | ||
| "build:ui": "pnpm create:icon-saas && pnpm create:mapping && pnpm build:entry && pnpm -C internals/cli build:ui", | ||
| "build:ui": "pnpm build:svgs2iconSaas && pnpm create:mapping && pnpm build:entry && pnpm -C internals/cli build:ui", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify consistency with the build:runtime script.
The change from create:icon-saas to build:svgs2iconSaas aligns with the cleanup logic added to prevent build failures. However, the build:runtime script on line 56 still uses create:icon-saas. If build:runtime encounters similar build issues, consider updating it consistently.
Run the following script to examine what these scripts actually execute:
🏁 Script executed:
#!/bin/bash
# Check what the create:icon-saas command does in internals/cli
# and compare with build-svgs-saas in internals/automate
echo "=== Checking internals/cli for create:icon-saas ==="
fd -t f "package.json" internals/cli --exec cat {} | jq -r '.scripts["create:icon-saas"]'
echo -e "\n=== Checking internals/automate for build-svgs-saas ==="
fd -t f "package.json" internals/automate --exec cat {} | jq -r '.scripts["build-svgs-saas"]'
echo -e "\n=== Checking if build:runtime might need the same fix ==="
cat package.json | jq -r '.scripts["build:runtime"]'Length of output: 374
I need to examine the root package.json more carefully to understand the create:icon-saas script and its relationship to both build scripts.
---
🏁 Script executed:
```shell
#!/bin/bash
# Extract all scripts from root package.json
echo "=== Root package.json scripts ==="
cat package.json | jq '.scripts | keys_unsorted[]'
echo -e "\n=== Details of create:icon-saas script ==="
cat package.json | jq '.scripts["create:icon-saas"]'
echo -e "\n=== Details of build:ui script ==="
cat package.json | jq '.scripts["build:ui"]'
echo -e "\n=== Details of build:runtime script ==="
cat package.json | jq '.scripts["build:runtime"]'
echo -e "\n=== Details of build:svgs2iconSaas script ==="
cat package.json | jq '.scripts["build:svgs2iconSaas"]'
Length of output: 1791
Update build:runtime script to use build:svgs2iconSaas for consistency.
The build:ui script was changed to call build:svgs2iconSaas (which routes through internals/automate build-svgs-saas), but build:runtime still calls create:icon-saas (which attempts to invoke a non-existent script in internals/cli). Update line 56 from pnpm create:icon-saas && pnpm -C internals/cli build:runtime to pnpm build:svgs2iconSaas && pnpm -C internals/cli build:runtime to prevent build failures.
🤖 Prompt for AI Agents
In package.json around lines 56-58, the build:runtime script still invokes "pnpm
create:icon-saas" which calls a non-existent internals/cli script; replace that
segment with "pnpm build:svgs2iconSaas" so the build:runtime script becomes
consistent with build:ui and routes through internals/automate build-svgs-saas
before running "pnpm -C internals/cli build:runtime".
fix: 修复github-action构建脚本报错
PR
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.