File tree Expand file tree Collapse file tree
packages/cdkConstructs/src/config Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { CloudFormationClient , DescribeStacksCommand } from "@aws-sdk/client-cloudformation"
22import { S3Client , HeadObjectCommand } from "@aws-sdk/client-s3"
3+ import { StandardStackProps } from "../apps/createApp"
34
45export function getConfigFromEnvVar ( varName : string , prefix : string = "CDK_CONFIG_" ) : string {
56 const value = process . env [ prefix + varName ]
@@ -32,8 +33,11 @@ export async function getTrustStoreVersion(trustStoreFile: string, region: strin
3233 return headObjectResponse . VersionId !
3334}
3435
35- export function calculateVersionedStackName ( baseStackName : string , version : string ) : string {
36- return `${ baseStackName } -${ version . replaceAll ( "." , "-" ) } `
36+ export function calculateVersionedStackName ( baseStackName : string , props : StandardStackProps ) : string {
37+ if ( props . isPullRequest ) {
38+ return baseStackName
39+ }
40+ return `${ baseStackName } -${ props . version . replaceAll ( "." , "-" ) } `
3741}
3842
3943export { LAMBDA_INSIGHTS_LAYER_ARNS } from "./lambdaInsights"
You can’t perform that action at this time.
0 commit comments