feat: add VersionFileProjectType and register in ProjectTypeFactory (#124)#320
Open
sainathchinta wants to merge 2 commits into
Open
feat: add VersionFileProjectType and register in ProjectTypeFactory (#124)#320sainathchinta wants to merge 2 commits into
sainathchinta wants to merge 2 commits into
Conversation
Add a new ProjectType implementation that reads and writes a plain VERSION file. If a VERSION file exists in the project root, the plugin will use its contents as the current version and update the file with the next calculated version. This change enables projects without standard build files to specify their version in a VERSION file as requested in issue jenkinsci#124.
Register the new VersionFileProjectType in ProjectTypeFactory so that the plugin can detect and write to a VERSION file. This change allows projects without build files to specify their version in a VERSION file. Addresses issue jenkinsci#124.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds support for using a plain VERSION file as a source of truth for project version information, as requested in issue #124.
Changes
VersionFileProjectTypeclass that implementsProjectTypeto read and write a simple VERSION file in the project root.ProjectTypeFactoryso that it is discovered during version detection.VERSIONfile is present, the plugin will use its contents as the current version and will write back the calculated next version whenwriteVersionis enabled.Testing done
VERSIONfile is present and that the current version is read correctly.VersionFileProjectTypewrites the next version string back to the VERSION file.Comments
This change allows projects without build configuration files (e.g., those not using Maven or Gradle) to specify their version via a VERSION file. See issue #124 for context.