Allow manual versioning for code-push release-react
Hi there,
The code-push release-react command auto update the version from it's previously uploaded. Is there a way to manually control this versioning ?
Current Behavior
- Previous version on App Center
v1 - Next version on App Center is
v2when pushed a release viacode-push release-react
Expecting Behavior
- Previous version on App Center
v1 - Next version on App Center I want to see
v10orsome sortinstead ofv2by passing version value of my choicecode-push release-react --customVersion v10
Hi @rnagella, Thanks for reporting!
Unfortunately it isn't possible to set specific label for release. It is implemented like this for preventing version confusion and CodePush just take last available version. Could you please describe why would you like to set specific label version?
@alexandergoncharov One of the main reasons is issue with error tracking tool like Bugsnag, when uploaded source map we need to mention CodePush release number, so the errors are grouped approximately by version.
- since not each version promoted from staging to beta to production, I don't have a single source of truth for my source map on bug tracking system.
Let say, I have the following scenarios v1 released to staging -> Staging is on version v1 v2 released to staging -> Staging on version v2 v2 is now promoted from staging to beta -> Beta is now on version v1 v3 released to staging -> Staging is on v3 v3 is now promoted from staging to beta -> Beta is on v2 v2 Beta is now promoted to production -> Production version is version v1
so, my source map now fails because Staging is on V3, Beta is on V2, Production is on V1. Where my uploaded source map on my bug tracking system is with v3.
Another reason, I have white label of apps and I would like the release to be numbered same across the apps. In addition, I want to see the release version to be the same across the platforms(iOS and Android)
Allowing manual version which help me to Solve the above problems.
Yeah, that is expected behaviour. Please check this comment for more info: https://github.com/Microsoft/react-native-code-push/issues/1512#issuecomment-458011417
My recommendation for your situation is using --description filed of release for putting some version information of your release and do not worry about label version as it is just for CodePush. Please check this docs for more info: https://docs.microsoft.com/en-us/appcenter/distribution/codepush/cli#description-parameter Also, you can add some global variable for version in JS code.
I just would like to say that you shouldn't check you version by label in case if you are using promoting and your label can be changed for real code version in different deployments.
Please let me know if it was helpful of you have any questions.
@alexandergoncharov thank you for your time, I haven't imagined the label version is for just CodePush.
I agree with you that my problem can be solved having a global version in JavaScript code.
In my opinion CodePush should be able to provide a version consistency across the deployments, Identifying a release shouldn't be based on description, but a unique identifier. As more and more release we put out there, if we can't tell what version was promoted all the way to production by viewing on CodePush Dashboard.
Is there still no way to achieve this? We'd like for the codepush versions to match the version from our build server.
The documentation here shows a -v | --version parameter but looking at the source code for the cli there is no parameter.