react-native-code-push icon indicating copy to clipboard operation
react-native-code-push copied to clipboard

Allow manual versioning for code-push release-react

Open rnagella opened this issue 7 years ago • 6 comments

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 v2 when pushed a release via code-push release-react

Expecting Behavior

  • Previous version on App Center v1
  • Next version on App Center I want to see v10 or some sort instead of v2 by passing version value of my choice code-push release-react --customVersion v10

rnagella avatar Jan 26 '19 04:01 rnagella

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-zz avatar Jan 28 '19 05:01 alexandergoncharov-zz

@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.

  1. 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.

rnagella avatar Jan 28 '19 08:01 rnagella

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.

rnagella avatar Jan 28 '19 08:01 rnagella

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-zz avatar Jan 28 '19 09:01 alexandergoncharov-zz

@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.

rnagella avatar Jan 28 '19 18:01 rnagella

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.

AshleyMedway avatar Jan 22 '22 21:01 AshleyMedway