Skip to content

Commit

Permalink
Merge branch 'master' into conroy/update-lambda-resource-policies
Browse files Browse the repository at this point in the history
  • Loading branch information
kaizencc authored Mar 25, 2022
2 parents 465279d + 8c0a4c9 commit f974469
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/aws-cdk/test/integ/helpers/sam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ export function withSamIntegrationCdkApp<A extends TestContext & AwsContext>(blo
} else {
await installNpmPackages(fixture, {
'aws-cdk-lib': installationVersion,
'@aws-cdk/aws-lambda-go-alpha': installationVersion,
'@aws-cdk/aws-lambda-python-alpha': installationVersion,
'@aws-cdk/aws-lambda-go-alpha': `${installationVersion}-alpha.0`,
'@aws-cdk/aws-lambda-python-alpha': `${installationVersion}-alpha.0`,
'constructs': '^10',
});
}
Expand Down
6 changes: 4 additions & 2 deletions tools/@aws-cdk/individual-pkg-gen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/fs-extra": "^8.1.2",
"@types/jest": "^27.4.1"
"@types/jest": "^27.4.1",
"@types/semver": "^7.3.9"
},
"dependencies": {
"aws-cdk-migration": "0.0.0",
"fs-extra": "^9.1.0",
"@lerna/project": "4.0.0"
"@lerna/project": "4.0.0",
"semver": "^7.3.5"
},
"keywords": [
"aws",
Expand Down
6 changes: 5 additions & 1 deletion tools/@aws-cdk/individual-pkg-gen/transform-packages.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as path from 'path';
import * as awsCdkMigration from 'aws-cdk-migration';
import * as fs from 'fs-extra';
import { SemVer, parse } from 'semver';
// eslint-disable-next-line @typescript-eslint/no-require-imports
const lerna_project = require('@lerna/project');
// eslint-disable-next-line @typescript-eslint/no-require-imports
Expand Down Expand Up @@ -158,7 +159,10 @@ function transformPackageJson(pkg: any, source: string, destination: string, alp

packageJson.name += '-alpha';
if (ver.alphaVersion) {
packageJson.version = ver.alphaVersion;
// The -rc.0 suffix is used in the integration pipeline to distinguish candidate packages from real NPM packages, and needs to be retained
const rcSuffix = packageJson.version.endsWith('-rc.0') ? '-rc.0' : '';
const { major, minor, patch } = parse(packageJson.version) as SemVer;
packageJson.version = [major, minor, patch].join('.') + rcSuffix + '-alpha.0';
}
packageJson.repository.directory = `packages/individual-packages/${pkgUnscopedName}`;

Expand Down

0 comments on commit f974469

Please sign in to comment.