I created a library which I used on a project, I want to use a branch of the library depending of what branch the project is.
For example, if the project branch is development, I want the library's branch to be get by pubspec is to be development as well.
Note:
Both project and library have development branch.
There would be test, stage and production branch as well.
flutter_payments_helper:
git:
url: '[email protected]:my_project/library.git'
ref: 'development' // <---
No, YAML does not supports conditional logic nor does the pubspec parser. The best I can offer to add a tool to your CI process that modifies the pubspec during its run. You could also use that tool on your local machine during development and be fancy and add some git hooks that execute it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With