Skip to content

Commit 04af8f4

Browse files
committed
fix(apigw): make apigw environment default to release
1 parent 0f1041c commit 04af8f4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/modules/apigw/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ class Apigw {
594594
}
595595

596596
async deploy(inputs) {
597-
const { environment, oldState = {} } = inputs;
597+
const { environment = 'release', oldState = {} } = inputs;
598598
inputs.protocols = this.getProtocolString(inputs.protocols);
599599

600600
const { serviceId, serviceName, subDomain, serviceCreated } = await this.createOrUpdateService(
@@ -680,11 +680,11 @@ class Apigw {
680680
);
681681
}
682682

683-
console.log(`Releaseing service with id ${serviceId}, environment: ${inputs.environment}`);
683+
console.log(`Releaseing service with id ${serviceId}, environment: ${environment}`);
684684
await this.request({
685685
Action: 'ReleaseService',
686686
serviceId: serviceId,
687-
environmentName: inputs.environment,
687+
environmentName: environment,
688688
releaseDesc: 'Serverless api-gateway component deploy',
689689
});
690690
console.log(`Deploy service with id ${serviceId} successfully.`);
@@ -695,7 +695,7 @@ class Apigw {
695695
serviceName,
696696
subDomain,
697697
protocols: inputs.protocols,
698-
environment: inputs.environment,
698+
environment: environment,
699699
apiList,
700700
};
701701

0 commit comments

Comments
 (0)