From 320d3031bcef8dbcd05c0691c6a5942a4033f1a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arwid=20Thornstr=C3=B6m?= Date: Fri, 25 Nov 2022 13:29:42 +0100 Subject: [PATCH] 6: updated questions in create command (#14) --- src/commands/deployment/testservers/create/create.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/commands/deployment/testservers/create/create.ts b/src/commands/deployment/testservers/create/create.ts index 6817180..17e481f 100644 --- a/src/commands/deployment/testservers/create/create.ts +++ b/src/commands/deployment/testservers/create/create.ts @@ -1,11 +1,8 @@ import { GluegunMenuToolbox } from '@lenne.tech/gluegun-menu' const chalk = require('chalk'); const { AutoComplete, Input, Confirm } = require('enquirer'); -import { Octokit } from "@octokit/core"; -import { GluegunPrint } from 'gluegun'; import { defaultMenuSettings, getSettings } from '../../../../globals'; import { getRepoBranches } from '../../../../services/github_rest'; -const os = require("os"); const STACK_DEFAULTS = { STACK_ENVIRONMENT_NAME_TAG: 'test', @@ -160,9 +157,10 @@ module.exports = { const input = new Input({ type: 'input', name: 'stack', - message: `Insert name of the new stack (${chalk.yellow('photowall-test-xx-x')})` + message: `Subdomain of new server (${chalk.yellow('test-xxx')})` }); - const stackName = await input.run(); + const stacksuffix = await input.run(); + const stackName = `photowall-${stacksuffix}` if (options.includes(stackName)) { print.error(` @@ -176,7 +174,7 @@ module.exports = { } else if (stackName.indexOf('photowall-test-') !== 0) { print.error(` - The stack must begin with ${chalk.yellow('photowall-test-')}. + The stack must begin with ${chalk.yellow('test-')} and then something after like ${chalk.yellow('test-yourname-1')}. `); if (toolbox.fromMenu()) {