-
Notifications
You must be signed in to change notification settings - Fork 1
Multi module version management tool #63
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # Release | ||
|
|
||
| **Release** is a command line tool that automates the versioning and releasing of multi-module Go projects. | ||
|
|
||
| ## Limitations | ||
|
|
||
| - All modules have the same version. | ||
| - Git tags are treated as the source of truth for the version. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How's this a limitation?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have seen some tools using some kind of a file to declare all modules and respective versions. The tool then uses this file to create tags etc. The downside of this approach is that it requires manually updating this file for every release. My goal with this tool is to make it fully automated using only git data as source of truth |
||
|
|
||
| ## Usage | ||
|
|
||
| ### Build Manifest | ||
|
|
||
| `manifest` command builds the manifest file for the project. It crawls the project, finds all modules and their dependencies, and reads the respective Git tags to determine the version of each module. | ||
|
|
||
| The manifest file contains the following information: | ||
|
|
||
| - Module path | ||
| - Current version | ||
| - Dependencies and their versions (within the same repository) | ||
|
|
||
| _Note: Manifest file is temporary and is deleted after the release is created._ | ||
|
|
||
| ```bash | ||
| $ release manifest | ||
| ``` | ||
|
|
||
| ### Create Release | ||
|
|
||
| `create` command creates a release branch and updates the version of the project. It reads the manifest file and updates the version of the project and all the modules within the same repository. It updates the new version in the manifest file. | ||
|
|
||
| ```bash | ||
| $ release create --version v0.1.0 | ||
| # or auto-increment the version | ||
| $ release create --major | --minor | --patch | ||
| ``` | ||
|
|
||
| ### Tag | ||
|
|
||
| `tag` command creates Git tags for all the modules in the project. It reads the manifest file and creates Git tags for all the modules in the project. | ||
|
|
||
| ```bash | ||
| # create tags | ||
| $ release tag | ||
| # or create and push the tags to the remote repository | ||
| $ release tag --push | ||
| ``` | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| module github.com/gojekfarm/xtools/cmd/release | ||
|
|
||
| go 1.24 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| package main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should solve this limitation for sure, I have observed this to be a problem often. Specially with auto-dependency bump tools like renovate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally yes. I’m still unsure about how to go about solving this