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

Support generic VERSION file to record version info #124

Open
SohamJ opened this issue Oct 1, 2021 · 1 comment
Open

Support generic VERSION file to record version info #124

SohamJ opened this issue Oct 1, 2021 · 1 comment
Assignees
Labels
good first issue Good for newcomers

Comments

@SohamJ
Copy link
Contributor

SohamJ commented Oct 1, 2021

Dependencies

N/A

Feature Request

Overview

The request is to support a generic VERSION file where the plugin can read and update the semantic version information.

VERSION file is a text file that holds only the version info and sits in the root of the git repository. For example:

# VERSION
1.0.0

Requirement

Version is used in many places in a typical SDLC process - from local development (using Makefiles or build files like pom/build.gradle etc), to building and deploying the artifact/Docker image in CICD (Jenkinsfile).

Instead of maintaining the version info in each of these files, we maintain a VERSION file in the root of the project as the single source of truth. All other files read the version from it.

For instance, we currently use conventional-changelog/standard-version project to parse version from this file and update the version and generate the changelog. Unfortunately, this tool only supports npm natively, which was another justification to use a VERSION file to keep versioning consistent across all project types, including the ones that don't use a build tool (e.g repos that maintain configurations only and no source code). Consistency in versioning will help simplify and increase adoption/ROI for adopting good commit standards (especially across a big enterprise)

This plugin can parse the version info from this file and increment it with nextVersion step.

Proposed Solution

  • Plugin can support a parameter such as nextVersion versionFile: 'VERSION' to read the update the version. It can be defaulted when no other build file is found in the repo
  • Use nextVersion to grab the new version in Jenkins Pipeline to use across build/deploy processes and create the git tag
@philippart-s
Copy link
Collaborator

Here is more precision when git tag and / or configuration (as pom.xml for instance) exists.

The git tag is used, if no git tag the VERSION file is used, if no VERSION file the configuration file is used.

@philippart-s philippart-s self-assigned this Oct 21, 2021
@philippart-s philippart-s added good first issue Good for newcomers and removed Hacktoberfest labels Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants