(start, end, full)
| 592 | years-- |
| 593 | months = 12 - then.getUTCMonth() + now.getUTCMonth() |
| 594 | } else { |
| 595 | months = now.getUTCMonth() - then.getUTCMonth() |
| 596 | } |
| 597 | if (now.getUTCDate() < then.getUTCDate()) { |
| 598 | months-- |
| 599 | } |
| 600 | return years + '.' + months; |
| 601 | } |
| 602 | |
| 603 | function getAppVersion (callback) { |
| 604 | fs.readFile(settings.TGX_SOURCE_PATH + '/version.properties', 'utf-8', function (err, data) { |
| 605 | if (err) { |
| 606 | callback(null); |
| 607 | } else { |
| 608 | const buildVersion = parseInt(getProperty(data, 'version.app')); |
| 609 | const creationDate = parseInt(getProperty(data, 'version.creation')); |
| 610 | const ndkPrimary = getProperty(data, 'version.ndk_primary'); |
| 611 | const ndkLegacy = getProperty(data, 'version.ndk_legacy'); |
| 612 | if (!creationDate) { |
| 613 | callback('#' + buildVersion); |
| 614 | return; |
| 615 | } |
| 616 | const majorVersion = getProperty(data, 'version.major'); |
| 617 | getCommitDate((commitDate) => { |
| 618 | const buildDate = new Date(commitDate * 1000); |
| 619 | const fromDate = new Date(creationDate); |
| 620 | const minorVersion = monthYears(buildDate, fromDate); |
| 621 | callback({ |
no outgoing calls
no test coverage detected