deploy-stack 0.12.0 → 0.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/commands/init.js +5 -3
package/package.json
CHANGED
package/src/commands/init.js
CHANGED
|
@@ -61,7 +61,7 @@ export async function mainStack({ isHeadless = false, headlessOptions = {} } = {
|
|
|
61
61
|
intro(color.bgCyan(color.black(' deploy-stack ☁️ ')));
|
|
62
62
|
|
|
63
63
|
// 2. Ask for the target directory FIRST
|
|
64
|
-
|
|
64
|
+
projectName = await text({
|
|
65
65
|
message: 'Where should we generate the infrastructure? (Type "." for current directory)',
|
|
66
66
|
placeholder: '.',
|
|
67
67
|
initialValue: '.',
|
|
@@ -334,8 +334,10 @@ export async function mainStack({ isHeadless = false, headlessOptions = {} } = {
|
|
|
334
334
|
|
|
335
335
|
const isGitInitialized = fsSync.existsSync(path.join(targetDir, '.git'));
|
|
336
336
|
|
|
337
|
-
const
|
|
338
|
-
const applyStep =
|
|
337
|
+
const needsCd = projectName && projectName !== '.';
|
|
338
|
+
const applyStep = needsCd
|
|
339
|
+
? `cd ${projectName} && npx deploy-stack apply`
|
|
340
|
+
: 'npx deploy-stack apply';
|
|
339
341
|
|
|
340
342
|
const gitInstructions = isGitInitialized
|
|
341
343
|
? `git add . && git commit -m "chore: add AWS infrastructure and CI/CD" && git push`
|