UI for Zipcoin Blue

1234567891011121314151617181920212223242526272829
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. const tslib_1 = require("tslib");
  4. const path = require("path");
  5. const fs_1 = require("@ionic/cli-framework/utils/fs");
  6. function getAndroidSdkToolsVersion() {
  7. return tslib_1.__awaiter(this, void 0, void 0, function* () {
  8. const androidHome = process.env.ANDROID_HOME;
  9. if (androidHome) {
  10. try {
  11. const f = yield fs_1.fsReadFile(path.join(androidHome, 'tools', 'source.properties'), { encoding: 'utf8' });
  12. for (let l of f.split('\n')) {
  13. const [a, b] = l.split('=');
  14. if (a === 'Pkg.Revision') {
  15. return b;
  16. }
  17. }
  18. }
  19. catch (e) {
  20. if (e.code !== 'ENOENT') {
  21. throw e;
  22. }
  23. }
  24. }
  25. return undefined;
  26. });
  27. }
  28. exports.getAndroidSdkToolsVersion = getAndroidSdkToolsVersion;