Skip to content

Commit 0895fde

Browse files
authored
chore(toolkit): publish alphas with version hash (#33256)
Make the local-publish helper include an identifiable build in the package version. Also export `package.json` as this is good practice. ### Describe any new or updated permissions being added n/a ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent c346e82 commit 0895fde

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/@aws-cdk/toolkit/build-tools/package.sh

+3
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22

33
version=${1:-latest}
44
reset=0.0.0
5+
commit=$(git rev-parse --short HEAD)
56

67
# Toolkit package root
78
cd "$(dirname $(dirname "$0"))"
89

10+
npm pkg set version=0.0.0-alpha.$commit
911
npm pkg set dependencies.@aws-cdk/cx-api=$version
1012
npm pkg set dependencies.@aws-cdk/cloudformation-diff=$version
1113
npm pkg set dependencies.@aws-cdk/region-info=$version
1214
yarn package --private
15+
npm pkg set version=$reset
1316
npm pkg set dependencies.@aws-cdk/cx-api=$reset
1417
npm pkg set dependencies.@aws-cdk/cloudformation-diff=$reset
1518
npm pkg set dependencies.@aws-cdk/region-info=$reset

packages/@aws-cdk/toolkit/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
".": {
1111
"types": "./lib/index.d.ts",
1212
"default": "./lib/index.js"
13-
}
13+
},
14+
"./package.json": "./package.json"
1415
},
1516
"scripts": {
1617
"awslint": "cdk-awslint",

0 commit comments

Comments
 (0)