title: codepush update's appVersion is incorrect. It's always the same as the current app's version
body: <p>I am trying to get codepush working for my react-native app on Android. For better understanding and control, i am manually checking for updates. Here's my code:</p>
  
  <pre><code>// Check for Codepush app update every time app is opened.
  console.log('Checking for codepush update !');
  codePush.checkForUpdate(CODEPUSH_DEPLOYMENT_KEY, (update) =&gt; {console.log('handleBinaryVersionMismatchCallback: ', update)})
      .then((update) =&gt; {
          console.log('Code push remote package: ', update);
          if (update != null) {
              let desc = update['description'];
              let newVersion = update['appVersion'];
              let currentVersion = RNDeviceInfo.getVersion();
              console.log('current version: ', currentVersion);
  
              let currentSemVer = currentVersion.split('.');
              let newSemVersion = newVersion.split('.');
              let curV = parseFloat(currentSemVer[1] + '.' + currentSemVer[2]);
              let newV = parseFloat(newSemVersion[1] + '.' + newSemVersion[2]);
              console.log('currentSemVer:', currentSemVer);
              console.log('newSemVersion:', newSemVersion);
              console.log('curV:', curV);
              console.log('newV:', newV);
  
              if (currentVersion === newVersion) {
                  console.log('Exact same version. Ignoring codepush');
                  return;
              }
              if (newSemVersion[0] !== currentSemVer[0]) {
                  console.log('Major version mismatch. Ignoring codepush');
                  return;
              }
              if (newV &lt; curV) {
                  console.log('Older version. Ignoring codepush');
                  return;
              }
  
              codePush.sync({
                  updateDialog: true,
                  installMode: codePush.InstallMode.IMMEDIATE,
              });
          }
      });
  </code></pre>
  
  <p>To release a new update, i update the android/app/build.gradle file like this:</p>
  
  <pre><code>android {
      compileSdkVersion rootProject.ext.compileSdkVersion
      buildToolsVersion rootProject.ext.buildToolsVersion
  
      defaultConfig {
          minSdkVersion rootProject.ext.minSdkVersion
          targetSdkVersion rootProject.ext.targetSdkVersion
          versionCode 8
          versionName "2.2.6"
  </code></pre>
  
  <p>and </p>
  
  <pre><code>appcenter codepush release-react -a &lt;appname&gt; -t "&gt;=2.0.0 &lt;=2.2.9" -d Production --description 'Trying to get codepush working'
  </code></pre>
  
  <p>In logcat, i can see that its getting the update, however, the appVersion of the update is the same as the app that was installed from playstore. Have tried multiple releases on codepush, the label increments, but the appVersion does not.</p>
  
  <pre><code>10-07 10:14:51.798 7668-7701/? I/ReactNativeJS: 'Code push remote package: ', { deploymentKey: '&lt;key&gt;',
        description: 'Trying to get codepush working',
        label: 'v8',
        appVersion: '2.2.5',
        isMandatory: false,
        packageHash: '&lt;&gt;',
        packageSize: 616685,
        downloadUrl: '&lt;&gt;',
        download: [Function],
        isPending: false,
        failedInstall: false }
      'current version: ', '2.2.5'
      'currentSemVer:', [ '2', '2', '5' ]
      'newSemVersion:', [ '2', '2', '5' ]
  10-07 10:14:51.799 7668-7701/? I/ReactNativeJS: 'curV:', 2.5
      'newV:', 2.5
      Exact same version. Ignoring codepush
  </code></pre>
  
  <p>Is my understanding incorrect that appVersion should be the update's app version from the build.gradle file ?</p>