Skip to content

feat: added commandline option to define config file name #386

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

Merged
merged 1 commit into from
Jun 26, 2025

Conversation

swollner
Copy link
Contributor

We need to be able to use a slightly modified configuration in our CI/CD pipeline. Therefore, we added an option to define the configuration file name via command-line arguments / environment variables

@qoomon qoomon requested a review from Copilot June 26, 2025 08:23
@qoomon qoomon self-assigned this Jun 26, 2025
@qoomon
Copy link
Owner

qoomon commented Jun 26, 2025

LGTM

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds the ability to specify a custom configuration file name via a new command-line option or environment variable, falling back to the default <artifactId>.xml.

  • Introduce versioning.configFile option and use it when initializing the config file.
  • Fallback to <artifactId>.xml if no option is provided.
  • Update README to document both command-line and environment-variable usage.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/main/java/me/qoomon/maven/gitversioning/GitVersioningModelProcessor.java Added OPTION_CONFIG_FILE_NAME, new logic to pick config file name from CLI, fallback behavior
README.md Documented VERSIONING_CONFIG_FILE env var and -Dversioning.configFile CLI flag
Comments suppressed due to low confidence (2)

src/main/java/me/qoomon/maven/gitversioning/GitVersioningModelProcessor.java:175

  • New branch logic for default config file fallback isn't covered by existing tests; consider adding unit tests for both cases (with and without the versioning.configFile option).
        if(configFileName == null){

README.md:282

  • README documents the environment variable VERSIONING_CONFIG_FILE but the code does not currently read this variable; update the documentation or implement support in code for this environment variable to ensure consistency.
  - `export VERSIONING_CONFIG_FILE=myConfig.xml`

@qoomon qoomon merged commit f260c3a into qoomon:master Jun 26, 2025
2 checks passed
@qoomon
Copy link
Owner

qoomon commented Jun 26, 2025

feel free to try version 9.11.0.

@swollner I'd be glad if you can confirm that it works as intended

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants