{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/code-push/issues/229","repository_url":"https://api.github.com/repos/Microsoft/code-push","labels_url":"https://api.github.com/repos/Microsoft/code-push/issues/229/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/code-push/issues/229/comments","events_url":"https://api.github.com/repos/Microsoft/code-push/issues/229/events","html_url":"https://github.com/Microsoft/code-push/issues/229","id":155824395,"number":229,"title":"Releasing new version when the versionName is dynamic","user":{"login":"igalarzab","id":529409,"avatar_url":"https://avatars.githubusercontent.com/u/529409?v=3","gravatar_id":"","url":"https://api.github.com/users/igalarzab","html_url":"https://github.com/igalarzab","followers_url":"https://api.github.com/users/igalarzab/followers","following_url":"https://api.github.com/users/igalarzab/following{/other_user}","gists_url":"https://api.github.com/users/igalarzab/gists{/gist_id}","starred_url":"https://api.github.com/users/igalarzab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igalarzab/subscriptions","organizations_url":"https://api.github.com/users/igalarzab/orgs","repos_url":"https://api.github.com/users/igalarzab/repos","events_url":"https://api.github.com/users/igalarzab/events{/privacy}","received_events_url":"https://api.github.com/users/igalarzab/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-05-19T20:12:56Z","updated_at":"2016-05-20T08:16:28Z","closed_at":null,"body":"Hello,\r\n\r\nI have some problems using code-push in react-native/Android when the versionName var is dynamic (and not an static string). You can reproduce the error with the following ``build.gradle`` file:\r\n\r\n```groovy\r\ndef versionMajor = 1\r\ndef versionMinor = 2\r\n\r\ndefaultConfig {\r\n    applicationId \"com.mypackage\"\r\n    minSdkVersion Integer.parseInt(project.ANDROID_MIN_SDK_VERSION)\r\n    targetSdkVersion Integer.parseInt(project.ANDROID_TARGET_SDK_VERSION)\r\n    versionCode versionMajor * 100 + versionMinor\r\n    versionName \"${versionMajor}.${versionMinor}\"\r\n    ndk {\r\n        abiFilters \"armeabi-v7a\", \"x86\"\r\n    }\r\n}\r\n```\r\n\r\nAnd this is the value of the ``buildGradle.android.defaultConfig`` dict when executing code-push (in the [following lines](https://github.com/Microsoft/code-push/blob/4a899e2a72b4490557738411487a9d58de816ac6/cli/script/command-executor.ts#L864))\r\n\r\n```javascript\r\n{\r\n\tapplicationId: 'com.mypackage',\r\n\tminSdkVersion: 'Integer.parseInt(project.ANDROID_MIN_SDK_VERSION)',\r\n\ttargetSdkVersion: 'Integer.parseInt(project.ANDROID_TARGET_SDK_VERSION)',\r\n\tversionCode: 'versionMajor * 100 + versionMinor',\r\n\tversionName: {},\r\n\t'': {},\r\n\t'\"$.$\"': '',\r\n\tndk: {\r\n\t\tabiFilters: '\"armeabi-v7a\", \"x86\"'\r\n\t}\r\n}\r\n```\r\n\r\nThat raises the following error when trying to release a new version:\r\n\r\n```\r\n[Error]  buildGradle.android.defaultConfig.versionName.replace is not a function\r\n```\r\n\r\nAny way to fix this issue? Maybe providing a way to specify the version in a manual way using the CLI?\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/Microsoft/code-push/issues/comments/220543856","html_url":"https://github.com/Microsoft/code-push/issues/229#issuecomment-220543856","issue_url":"https://api.github.com/repos/Microsoft/code-push/issues/229","id":220543856,"user":{"login":"igalarzab","id":529409,"avatar_url":"https://avatars.githubusercontent.com/u/529409?v=3","gravatar_id":"","url":"https://api.github.com/users/igalarzab","html_url":"https://github.com/igalarzab","followers_url":"https://api.github.com/users/igalarzab/followers","following_url":"https://api.github.com/users/igalarzab/following{/other_user}","gists_url":"https://api.github.com/users/igalarzab/gists{/gist_id}","starred_url":"https://api.github.com/users/igalarzab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igalarzab/subscriptions","organizations_url":"https://api.github.com/users/igalarzab/orgs","repos_url":"https://api.github.com/users/igalarzab/repos","events_url":"https://api.github.com/users/igalarzab/events{/privacy}","received_events_url":"https://api.github.com/users/igalarzab/received_events","type":"User","site_admin":false},"created_at":"2016-05-20T08:16:28Z","updated_at":"2016-05-20T08:16:28Z","body":"Cool, thanks!"}}
{"actor":{"display_login":"igalarzab"}}