kopia lustrzana https://github.com/c9/core
Merge pull request +6997 from c9/custom-domain
Add --domain custom TLD optionpull/85/head
commit
2f9f432043
|
@ -54,6 +54,7 @@ function main(argv, config, callback) {
|
||||||
.default("settings", DEFAULT_SETTINGS)
|
.default("settings", DEFAULT_SETTINGS)
|
||||||
.describe("settings", "Settings file to use")
|
.describe("settings", "Settings file to use")
|
||||||
.describe("dump", "dump config file as JSON")
|
.describe("dump", "dump config file as JSON")
|
||||||
|
.describe("domain", "Top-level domain to use (e.g, c9.io)")
|
||||||
.boolean("help")
|
.boolean("help")
|
||||||
.describe("help", "Show command line options.");
|
.describe("help", "Show command line options.");
|
||||||
|
|
||||||
|
@ -86,6 +87,14 @@ function start(configName, options, callback) {
|
||||||
|
|
||||||
var settings = require(path.join(__dirname, "./settings", settingsName))();
|
var settings = require(path.join(__dirname, "./settings", settingsName))();
|
||||||
|
|
||||||
|
if (argv.domain) {
|
||||||
|
settings.c9.domain = argv.domain;
|
||||||
|
for (var s in settings) {
|
||||||
|
settings[s].baseUrl = settings[s].baseUrl
|
||||||
|
&& settings[s].baseUrl.replace(/[^./]+\.[^.]+$/, argv.domain);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var plugins = require(configPath)(settings, options);
|
var plugins = require(configPath)(settings, options);
|
||||||
|
|
||||||
if (argv.help) {
|
if (argv.help) {
|
||||||
|
|
Ładowanie…
Reference in New Issue