Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

run 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #!/usr/bin/env node
  2. /*
  3. Licensed to the Apache Software Foundation (ASF) under one
  4. or more contributor license agreements. See the NOTICE file
  5. distributed with this work for additional information
  6. regarding copyright ownership. The ASF licenses this file
  7. to you under the Apache License, Version 2.0 (the
  8. "License"); you may not use this file except in compliance
  9. with the License. You may obtain a copy of the License at
  10. http://www.apache.org/licenses/LICENSE-2.0
  11. Unless required by applicable law or agreed to in writing,
  12. software distributed under the License is distributed on an
  13. "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  14. KIND, either express or implied. See the License for the
  15. specific language governing permissions and limitations
  16. under the License.
  17. */
  18. var args = process.argv;
  19. var Api = require('./Api');
  20. var nopt = require('nopt');
  21. // Handle help flag
  22. if (['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(process.argv[2]) >= 0) {
  23. require('./lib/run').help();
  24. process.exit(0);
  25. }
  26. // Parse arguments (includes build params as well)
  27. var opts = nopt({
  28. verbose: Boolean,
  29. silent: Boolean,
  30. debug: Boolean,
  31. release: Boolean,
  32. nobuild: Boolean,
  33. archs: String,
  34. list: Boolean,
  35. device: Boolean,
  36. emulator: Boolean,
  37. target: String,
  38. codeSignIdentity: String,
  39. codeSignResourceRules: String,
  40. provisioningProfile: String,
  41. automaticProvisioning: Boolean,
  42. buildConfig: String,
  43. noSign: Boolean
  44. }, { d: '--verbose' }, args);
  45. // Make options compatible with PlatformApi build method spec
  46. opts.argv = opts.argv.remain;
  47. require('./loggingHelper').adjustLoggerLevel(opts);
  48. new Api().run(opts).then(
  49. () => {
  50. console.log('** RUN SUCCEEDED **');
  51. },
  52. err => {
  53. var errorMessage = (err && err.stack) ? err.stack : err;
  54. console.error(errorMessage);
  55. process.exit(2);
  56. }
  57. );