-
Notifications
You must be signed in to change notification settings - Fork 4
chore: Add clean and build:clean scripts #548
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -4,7 +4,9 @@ | |||||||||||||||||||||
| "description": "Redpanda documentation", | ||||||||||||||||||||||
| "license": "ISC", | ||||||||||||||||||||||
| "scripts": { | ||||||||||||||||||||||
| "clean": "rm -rf docs .cache", | ||||||||||||||||||||||
| "build": "antora --to-dir docs --fetch local-antora-playbook.yml", | ||||||||||||||||||||||
| "build:clean": "npm run clean && npm run build", | ||||||||||||||||||||||
| "serve": "wds --node-resolve --open / --watch --root-dir docs --port 5002", | ||||||||||||||||||||||
| "start": "cross-env-shell LIVERELOAD=true npx gulp" | ||||||||||||||||||||||
|
Comment on lines
+7
to
11
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Description: Verify which directories are created by build vs. start scripts
# Check the playbook configuration
echo "=== Checking playbook configuration ==="
if [ -f "local-antora-playbook.yml" ]; then
echo "Playbook exists. Checking output.dir configuration:"
rg -A 2 "^output:" local-antora-playbook.yml || echo "No output.dir configured (defaults to ./build/site for gulp)"
else
echo "Playbook file not found"
fi
# Check what directories currently exist
echo -e "\n=== Current output directories ==="
ls -la | rg "^d.*(docs|build|\.cache)" || echo "No output directories found"
# Check gulpfile for confirmation
echo -e "\n=== Gulpfile output directory logic ==="
rg -A 1 "outputDir.*=.*playbook" gulpfile.jsRepository: redpanda-data/cloud-docs Length of output: 480 Major: Inconsistent output directories between build and start workflows. The
The clean script should be updated to remove both output directories: Proposed fix- "clean": "rm -rf docs .cache",
+ "clean": "rm -rf docs build .cache",📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||
| }, | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
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.
Critical: Use a cross-platform solution for the clean script.
The
rm -rfcommand is Unix/Linux/macOS specific and will fail on Windows, blocking Windows developers from using this script.🔧 Proposed fix using rimraf for cross-platform compatibility
Install
rimrafas a dev dependency:Then update the script:
Alternatively, use
del-cli:🤖 Prompt for AI Agents