-
Notifications
You must be signed in to change notification settings - Fork 242
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
Improve versioning of status-go #422
Comments
Decreasing priority as this issue doesn't block anything. |
* Add release-branch target to create new release branch and bump minor development version * Add release-tag target to create new tag and bump patch version on a given release References status-im#422
Hello,
Note that There is one detail missing on the PR: the params.Version should be set to Major.Minor.Patch (no Meta) in case Meta is blank. Would that be an acceptable approach? (note that that is the behavior that the Makefile targets are expecting). If these changes are OK, I will proceed to work on the other points in the acceptance criteria. |
status-go versions are composed by a major.minor.patch-meta format. status-im#422 proposes that production releases should be versioned as major.minor.patch, without the meta portion in the string. This commit allows the use of the proposed release format when the VersionMeta string is empty. References status-im#422
#504 fails to pass on CI tests on gometalinter unparams because we are passing constant values to the function that builds the version string. geth/params/version.go:25:25:warning: parameter major always receives 0 (unparam) We could just use the constants in the function without passing them as params, but I did it this way to make it easier to test the function. Any thoughts here? |
@athos-ribeiro, thank you for your contribution! Let's work closely on this one as it's pretty complex and requires some testing by org members. I will review your PRs shortly.
It will be done on a CI server but it doesn't matter. There should be a shell script that anyone can execute that it should create proper branches and tags.
The same answer. Regarding versioning. Currently, we keep some values in |
For the proposed flow, what would define the current version in Bullet 1 infers version Should I understand that the current version in In this case, I still have a few questions for the proposal, which came up while refactoring #501, as requested :
|
Eventually, we won't have
So, currently, in
We don't need a release branch. We can work with the fact that there are no release branches yet. I will answer all your questions below. Let's only assume that we don't care about building binaries for now but a new release is a new git tag. Sorry for the confusion, I shouldn't mix making releases and binaries in the same paragraph. Let's assume that we have only one tag It can get tricky now. Let's assume that we did a few releases in When writing that explanation, I realized that the logic the script needs to embrace is pretty complicated. We can make it much easier for now and instead of relying on script's logic, we can create a simpler script to just make specific releases. For instance I believe there is already a semver implementation in bash, so what would be needed here is some logic to detect the highest git tag in a branch, which also should be easy. When we confirm that this manual script is good, we will be able to move it further and automate it. I am happy to chat more interactively on Riot if you would like to. My nick is |
Closing it, the progress will be tracked in status-im/swarms#52 |
Problem
The current versioning of status-go is inconsistent, not automated and does not follow semver rules.
Implementation
The most important goals are to make it consistent and automate the process, if not fully, at least to some degree.
A proposed flow:
develop
is0.10.0
,release/0.10
. Its version should be0.10.0
. At the same time, the version indevelop
should be bumped to0.11.0
,release/0.10
should report a version0.10.0-beta.1
, the next one0.10.0-beta.2
and so on,0.10.0
should be created which should trigger a build with version0.10.0
(note a missing-beta
label),release/0.10
should be bumped to0.10.1
,develop
will have versions0.11.0-alpha.1
,0.11.0-alpha.2
and so on.Additionally, there should be more information about the build like commit SHA, datetime, geth version etc.
When we have a few tags, we can automate it further as a proper version can be figured out based on a branch name and history of tags.
Creating a release branch with bumping commits should be created as a bash script and encapsulated in Makefile. It should not be a manual process as it's troublesome.
Problems that this flow solves:
develop
and release branches,develop
or even work on two releases at the same time,Acceptance Criteria
make release-branch
. It should create a branch and proper commits bumping versions. It should be run only fromdevelop
,make release-tag
which can be run only from a release branch. It should create a proper tag and commits bumping versions,statusd version
should print version and build information,statusd
should print anINFO
log with version and build information.Notes
The version is currently hardcoded in https://github.com/status-im/status-go/blob/develop/geth/params/version.go. It consists of four components: major, minor, patch and meta. Note: meta is pretty arbitrary but has a defined format: http://semver.org/#spec-item-10
There are also additional build flags that should be reviewed https://github.com/status-im/status-go/blob/develop/Makefile#L36.
The text was updated successfully, but these errors were encountered: