mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-23 12:55:26 +00:00
Create organized structure: - benchmark/ - Performance benchmarking scripts - ci/ - CI/CD automation scripts - deploy/ - Deployment scripts and docs - publish/ - Package publishing scripts - test/ - Testing scripts - validate/ - Validation & verification scripts Update README with new structure and usage examples. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
38 lines
1.3 KiB
Bash
Executable file
38 lines
1.3 KiB
Bash
Executable file
#!/bin/bash
|
|
# CI/CD script to auto-fix package-lock.json and create a commit
|
|
# Use this in GitHub Actions to automatically fix lock file issues
|
|
|
|
set -e
|
|
|
|
echo "🔍 Checking package-lock.json sync for CI/CD..."
|
|
|
|
cd npm
|
|
|
|
# Try npm ci first to check if lock file is in sync
|
|
if npm ci --dry-run 2>&1 | grep -q "can only install packages when your package.json and package-lock.json"; then
|
|
echo "❌ Lock file out of sync - fixing automatically..."
|
|
|
|
# Update lock file
|
|
npm install
|
|
|
|
# Check if we're in a git repository and have changes
|
|
if git diff --quiet npm/package-lock.json; then
|
|
echo "✅ Lock file is now in sync (no changes needed)"
|
|
else
|
|
echo "✅ Lock file updated"
|
|
|
|
# If running in GitHub Actions, commit and push
|
|
if [ -n "$GITHUB_ACTIONS" ]; then
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
git add npm/package-lock.json
|
|
git commit -m "chore: Auto-sync package-lock.json [skip ci]"
|
|
git push
|
|
echo "✅ Lock file committed and pushed"
|
|
else
|
|
echo "⚠️ Lock file updated but not committed (not in GitHub Actions)"
|
|
fi
|
|
fi
|
|
else
|
|
echo "✅ Lock file is already in sync"
|
|
fi
|