@codemod/azure-pipelines-lock-swift-deps
Add dependency-locking flags to inline Swift and xcodebuild commands in Azure Pipelines YAML so CI uses checked-in package resolution data instead of resolving packages opportunistically.
Installation
bash
Usage
This codemod rewrites Azure Pipelines YAML command values under script, bash, and pwsh keys.
swift build ...->swift build --disable-automatic-resolution ...swift test ...->swift test --disable-automatic-resolution ...xcodebuild ... build|test|archive|analyze-> inserts both-disableAutomaticPackageResolutionand-onlyUsePackageVersionsFromResolvedFilexcodebuild -resolvePackageDependencies ...-> inserts the same twoxcodebuildflags
Preserve cases:
- Commands that already include the lock flags stay unchanged
- Non-Swift commands stay unchanged
- Commented lines inside block scalars stay unchanged
Target files:
**/*.yml**/*.yaml
Development
bash
License
MIT