Skip to content
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

Handle .env when updating Quarkus properties #79

Open
gsmet opened this issue Mar 16, 2024 · 1 comment
Open

Handle .env when updating Quarkus properties #79

gsmet opened this issue Mar 16, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@gsmet
Copy link
Collaborator

gsmet commented Mar 16, 2024

The .env file at the root of a Quarkus project can contain environment variables that configures Quarkus and so can contain env var version of the properties.

For instance QUARKUS_MY_PROPERTY or _DEV_QUARKUS_MY_PROPERTY for something that is only enabled for the dev profile.

The rule is basically that any letter will be uppercased, numbers will be left alone and anything else will be transformed to _.

Note that while simple cases might be manageable, I'm not entirely sure how we will be able to handle regexps. We might be able to handle the most common cases (and make sure we catch errors if the transformed regexp is invalid).

One difficulty will be that my-property has to be changed to MY_PROPERTY but [a-z] shouldn't be affected. Also - can be used at the end of a class of characters and in this case, it is just a - that should be replaced.

@gsmet gsmet added the enhancement New feature or request label Mar 16, 2024
@timtebeek timtebeek moved this to Backlog in OpenRewrite Mar 17, 2024
@ammachado
Copy link
Contributor

This requires changes on OpenRewrite: openrewrite/rewrite#3993

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

2 participants