-
Notifications
You must be signed in to change notification settings - Fork 44
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
Governance: Automatically calculate the current version number through Git #537
Comments
Could you please confirm if this issue is still open and if I can start working on it? |
@rajeshkio Yeah, this issue is currently not aasign to anyone. Welcome to claim it! Maybe you need to know some background of this feature. #362 |
Thank you. I checked it. My idea is to create a directory 'scripts' and add a script to find the version number and update the pkg/version/VERSION. Is this the right approach or can you recommend any other way. |
@rajeshkio I have an idea that has been validated in production here for your reference. The following example can generate version information and some git helpers, which should help you quickly implement this issue. |
ohh it looks like most of the things are already done. Let me try to build and see what is missing. |
@rajeshkio Yes, some basic libraries can be reused. Looking forward to your PR! |
one silly question maybe. Should I directly import your libraries and use them or should I create new files with almost similar contents for this repo? |
@rajeshkio Importing library |
Thought so. I will use the same structure and add or remove contents as needed. |
@rajeshkio No problem, you can integrate according to actual needs. 👍 |
…usionStack#537 /kind feature ## What this PR does / why we need it: Automates versioning and updates pkg/version/VERSION file
@rajeshkio Hi, I have created a new issue #560 for future optimization. |
What would you like to be added?
Automatically calculate the current version number through Git.
For example, assuming the latest tag is
v0.4.2
, ifHEAD
is equal tov0.4.2
, then the version number isv0.4.2
. If not equal, the version number isv0.4.3-xxxxxx
, among them,xxxxxx
is${shortSha}
.Why is this needed?
The current version number is hardcode in the pkg/version/VERSION file, and its value needs to be manually modified before each new version is released, which is not conducive to long-term maintenance.
The text was updated successfully, but these errors were encountered: