-
Notifications
You must be signed in to change notification settings - Fork 301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[IMP] Add env var expansion for repo.yml #5
Conversation
* Expand environment variables in repo.yml before use
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you think PR for gitaggregator would be better?
@@ -11,6 +11,7 @@ conf=/opt/odoo/custom/src/repos.yaml | |||
if [ -f $conf ]; then | |||
log INFO Aggregating repositories from $conf | |||
cd $(dirname $conf) | |||
echo $(eval echo $(cat $conf)) > $conf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better use envsubst, like with conf files.
Env vars seem a bit more on the side of the system configuration vs. a CLI tool IMO, but I could be wrong. TBH this is the first I've heard of the tool, so I'm not sure of a use case outside of this one. If you think I should submit that way though, I don't have any problems with it. TIL with envsubst - not sure how I've gone this long in life without needing it! Updated. |
ee31dd1
to
f27c8a9
Compare
Normally at devel time the volume will be mounted readonly, so no chance to write there.
I added a little fix, but there's still a problem: this would break the scaffolding's setup-devel step. We could either support this also in tecnativa/git-aggregator or you could propose this PR to upstream. |
Hrmmm alright so out of the choice of git-aggregator Docker container vs. library, library is probably best. Seems like the feature would get buried in the container & be an unexpected feature. PR in acsone/git-aggregator#8 |
Nice, I merged acsone/git-aggregator#8 in our fork's master branch, so you have it in https://hub.docker.com/r/tecnativa/git-aggregator and will have it in this image too after the next rebuild (should be done in 30 mins) |
Hooray thanks @yajo! This feature should help me quite a bit 😄 |
Apply #165 in scaffolding. See it for details.
My use case being a dynamic odoo version, which interestingly enough could also work for module branches too.