🔧 Vendoring Maintenance Scripts¶
PowerShell scripts for managing vendored dependencies.
Scripts¶
verify_juce.ps1¶
Verifies JUCE 7.0.9 installation.
Checks:
- ✓ Submodule exists (juce/.git)
- ✓ CMakeLists.txt exists
- ✓ Config file exists (_metadata/juce_config.yaml)
- ✓ Version file exists (_metadata/juce_installed_version.txt)
Returns: Exit code 0 if all checks pass, 1 if any fail
Use case: Quick health check after cloning or updating repository
verify_vendored.ps1¶
Verifies integrity of all vendored dependencies.
Checks: - ✓ README_VENDOR.md exists for each dependency - ✓ LICENSE files present - ✓ CMakeLists.txt configured - ✓ Lock file is up-to-date
Returns: Report of missing/incorrect files
Use case: Pre-commit validation, CI/CD checks
update_vendored.ps1¶
Updates vendored dependency to new version.
# List all vendored dependencies
.\scripts\update_vendored.ps1 -ListVendored
# Update a specific library
.\scripts\update_vendored.ps1 -Library JUCE -Version 7.0.10
# Dry run (no actual changes)
.\scripts\update_vendored.ps1 -Library JUCE -Version 7.0.10 -DryRun
Parameters:
- -ListVendored: Show all current vendored dependencies
- -Library <name>: Name of library to update
- -Version <ver>: Target version
- -DryRun: Preview changes without applying them
Use case: Updating to security patches, new releases
Warning: Always review changes before committing!
Workflow Examples¶
Adding New Dependency¶
# 1. Add submodule (from parent directory)
cd ..
git submodule add https://github.com/org/library.git library_name
# 2. Create config files
# Edit _metadata/library_name_config.yaml
# Update _metadata/vendored_versions.lock
# 3. Verify
.\scripts\verify_vendored.ps1
Updating Existing Dependency¶
# 1. Check current version
.\scripts\update_vendored.ps1 -ListVendored
# 2. Preview update
.\scripts\update_vendored.ps1 -Library JUCE -Version 7.0.10 -DryRun
# 3. Apply update
.\scripts\update_vendored.ps1 -Library JUCE -Version 7.0.10
# 4. Verify
.\scripts\verify_juce.ps1
Pre-Commit Validation¶
# Run before committing vendoring changes
.\scripts\verify_vendored.ps1
.\scripts\verify_juce.ps1
# If all pass, safe to commit
git commit -m "vendor: Update dependencies"
Error Handling¶
All scripts: - Return exit code 0 on success - Return exit code 1 on failure - Display colored output (Green = OK, Red = FAIL) - Can be used in CI/CD pipelines
CI/CD Integration¶
# .github/workflows/verify-vendored.yml
- name: Verify vendored dependencies
run: |
powershell -File "2 - FOUNDATION/03_INFRA/03_03_dependency_management/03_03_05_vendoring/scripts/verify_vendored.ps1"
Maintenance Notes¶
- Scripts location: Always run from vendoring root via
.\scripts\script_name.ps1 - Path handling: Scripts use
$PSScriptRoot\..to find vendoring root - Metadata updates: Always update
_metadata/vendored_versions.lockwhen changing versions - Testing: Test in development branch before applying to main
See Also¶
- ../_metadata/ - Metadata files
- ../VENDOR_POLICY.md - Vendoring policy
- ../README.md - Main documentation