[TIMOB-26124] Android: "Ti.buildHash" property always returns null
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Low |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2018-09-19T21:34:42.000+0000 |
| Affected Version/s | Release 6.0.0 |
| Fix Version/s | Release 7.5.0 |
| Components | Android |
| Labels | android, hash |
| Reporter | Joshua Quick |
| Assignee | Joshua Quick |
| Created | 2018-06-12T18:17:11.000+0000 |
| Updated | 2018-10-05T19:05:36.000+0000 |
Description
*Summary:*
The
Ti.buildHash property always returns null on Android. This has been happening since Titanium 6.0.0.
_(This is not an issue on iOS.)_
*Steps to reproduce:*
* Build and run the below code on Android.
* On app startup, an alert displays the buildHash.
* Note that it displays it as "undefined". _(This is the bug.)_
alert("Ti.buildHash = " + Ti.buildHash);
*Cause:*
Our "android.js" build script expects to receive option.gitHash with a capital 'H' here...
https://github.com/appcelerator/titanium_mobile/blob/master/build/android.js#L22
But our "scons-build.js" and "scons-cleanbuild.js" scripts are passing in a lowercase githash.
https://github.com/appcelerator/titanium_mobile/blob/master/build/scons-build.js
https://github.com/appcelerator/titanium_mobile/blob/master/build/scons-cleanbuild.js
*Note:*
The buildHash is mostly needed to distinguish between an RC and GA version of Titanium. We log the Titanium version on app startup and this is helpful to better provide tech-support for the community.
PR (master): https://github.com/appcelerator/titanium_mobile/pull/10112
FR Passed.
Ti.buildHashdoes not return null/undefined but a value. Studio Ver: 5.1.1.201809051655 SDK Ver: 7.5.0 local build OS Ver: 10.13.5 Xcode Ver: Xcode 9.4.1 Appc NPM: 4.2.13 Appc CLI: 7.0.6 Daemon Ver: 1.1.3 Ti CLI Ver: 5.1.1 Alloy Ver: 1.13.2 Node Ver: 8.9.1 NPM Ver: 5.5.1 Java Ver: 10.0.2 Devices: ⇨ google Nexus 5 (Android 6.0.1) ⇨ google Nexus 6P (Android 8.1.0) Emulator: ⇨ Android 4.1.2PR Merged.
Verified the fix on SDK 7.5.0.v20181004095510.Working Fine. Closing.
Operating System Name = Mac OS X Version = 10.13.6 Architecture = 64bit Node.js Node.js Version = 8.9.1 npm Version = 5.5.1 Titanium CLI CLI Version = 5.1.1 Titanium SDK SDK Version =7.5.0.v20181004095510 Device =Oneplus 5T Android 8 Nexus 5 Android 6 emulator