New features! β¨ β¨
- Multiple .env files support - You can now specify multiple environment files using array syntax, addressing #136. Files are loaded in order with later files overriding earlier ones. Thanks to @jackwrfuller for the initial implementation that was incorporated into this feature!
Single env file (backwards compatible)
env: .env
Multiple env files (new array syntax)
env:
- .env.base
- .env.local
- .env.override
Command-level multiple env files
commands:
deploy:
env:
- .env.deploy
- .env.secrets
Bug fixes π π
- Windows compatibility improvements - A big welcome back to original maintainer @frankcarey who fixed path handling and binary execution issues on Windows platforms. Thanks to Frank for identifying and helping resolve these Windows issues! π
What's Changed
- Add comprehensive test coverage for multiple env files feature with 25+ unit and integration tests
- Implement StringArray type for flexible YAML parsing of both single strings and arrays
- Maintain full backwards compatibility with existing .ahoy.yml files
- Add graceful handling of non-existent env files (they are silently skipped)
- Support for comments and empty lines in env files
- Proper environment variable precedence: command-level overrides global, later files override earlier ones
Technical Details
The multiple env files feature uses a new StringArray type that handles both the old single string format and the new array format in YAML. This ensures 100% backwards compatibility - existing .ahoy.yml files will continue to work without any changes.
Full Changelog: v2.4.0...v2.5.0