(options, { rawOptions })
| 1424 | }); |
| 1425 | |
| 1426 | function deployCommand(options, { rawOptions }) { |
| 1427 | var site = options.args[0]; |
| 1428 | |
| 1429 | if (options.delete) { |
| 1430 | return deploy.deleteApp(site); |
| 1431 | } |
| 1432 | |
| 1433 | if (options.password) { |
| 1434 | Console.error( |
| 1435 | "Setting passwords on apps is no longer supported. Now there are " + |
| 1436 | "user accounts and your apps are associated with your account so " + |
| 1437 | "that only you (and people you designate) can access them. See the " + |
| 1438 | Console.command("'meteor authorized'") + " command."); |
| 1439 | return 1; |
| 1440 | } |
| 1441 | |
| 1442 | var loggedIn = auth.isLoggedIn(); |
| 1443 | if (! loggedIn) { |
| 1444 | Console.error( |
| 1445 | "You must be logged in to deploy, just enter your email address."); |
| 1446 | Console.error(); |
| 1447 | if (! auth.registerOrLogIn()) { |
| 1448 | return 1; |
| 1449 | } |
| 1450 | } |
| 1451 | |
| 1452 | // Override architecture iff applicable. |
| 1453 | var buildArch = DEPLOY_ARCH; |
| 1454 | if (options['override-architecture-with-local']) { |
| 1455 | Console.warn(); |
| 1456 | Console.labelWarn( |
| 1457 | "OVERRIDING DEPLOY ARCHITECTURE WITH LOCAL ARCHITECTURE.", |
| 1458 | "If your app contains binary code, it may break in unexpected " + |
| 1459 | "and terrible ways."); |
| 1460 | buildArch = archinfo.host(); |
| 1461 | } |
| 1462 | |
| 1463 | var projectContext = new projectContextModule.ProjectContext({ |
| 1464 | projectDir: options.appDir, |
| 1465 | serverArchitectures: _.uniq([buildArch, archinfo.host()]), |
| 1466 | allowIncompatibleUpdate: options['allow-incompatible-update'] |
| 1467 | }); |
| 1468 | |
| 1469 | main.captureAndExit("=> Errors while initializing project:", function () { |
| 1470 | // TODO Fix nested Profile.run warning here, too. |
| 1471 | projectContext.prepareProjectForBuild(); |
| 1472 | }); |
| 1473 | projectContext.packageMapDelta.displayOnConsole(); |
| 1474 | |
| 1475 | var buildOptions = { |
| 1476 | minifyMode: options.debug ? 'development' : 'production', |
| 1477 | buildMode: options.debug ? 'development' : 'production', |
| 1478 | serverArch: buildArch |
| 1479 | }; |
| 1480 | |
| 1481 | let deployPollingTimeoutMs = null; |
| 1482 | if (options['deploy-polling-timeout']) { |
| 1483 | deployPollingTimeoutMs = options['deploy-polling-timeout']; |
no test coverage detected
searching dependent graphs…