diff --git a/samples/aliyun-poc-fc-gpu.yml b/samples/aliyun-poc-fc-gpu.yml index ba53ee8..e02fb98 100644 --- a/samples/aliyun-poc-fc-gpu.yml +++ b/samples/aliyun-poc-fc-gpu.yml @@ -1,7 +1,7 @@ version: 0.0.1 provider: name: aliyun - region: cn-chengdu + region: cn-hangzhou vars: testv: testVarValue diff --git a/src/commands/destroy.ts b/src/commands/destroy.ts index fba2ac1..d2631a8 100644 --- a/src/commands/destroy.ts +++ b/src/commands/destroy.ts @@ -1,7 +1,7 @@ import { constructActionContext, logger, rosStackDelete } from '../common'; -export const destroyStack = async (stackName: string) => { - const context = constructActionContext({ stackName }); +export const destroyStack = async (stackName: string, options: { location: string }) => { + const context = constructActionContext({ stackName, ...options }); logger.info(`Destroying stack ${stackName}...`); await rosStackDelete(context); }; diff --git a/src/commands/index.ts b/src/commands/index.ts index 1d89703..66af58c 100644 --- a/src/commands/index.ts +++ b/src/commands/index.ts @@ -62,9 +62,10 @@ program program .command('destroy ') + .option('-f, --file ', 'specify the yaml file') .description('destroy serverless stack') - .action(async (stackName) => { - await destroyStack(stackName); + .action(async (stackName, { file }) => { + await destroyStack(stackName, { location: file }); }); program.parse();