Skip to content

Commit ba523ad

Browse files
committed
fix: optimize apigw deployment
1 parent 45df90c commit ba523ad

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/baas/apigw/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,9 @@ class Apigw {
327327
// bind custom domains
328328
async bindCustomDomain({ serviceId, subDomain, inputs }) {
329329
const { customDomains, oldState = {} } = inputs
330+
if (!customDomains) {
331+
return []
332+
}
330333
// 1. unbind all custom domain
331334
const customDomainDetail = await this.request({
332335
Action: 'DescribeServiceSubDomains',
@@ -510,13 +513,14 @@ class Apigw {
510513
)
511514
}
512515

513-
console.log(`Deploying service with id ${serviceId}.`)
516+
console.log(`Releaseing service with id ${serviceId}, environment: ${inputs.environment}`)
514517
await this.request({
515518
Action: 'ReleaseService',
516519
serviceId: serviceId,
517520
environmentName: inputs.environment,
518521
releaseDesc: 'Serverless api-gateway component deploy'
519522
})
523+
console.log(`Deploy service with id ${serviceId} successfully.`)
520524

521525
const outputs = {
522526
created: serviceCreated,

0 commit comments

Comments
 (0)