Skip to content

Commit

Permalink
chore(toolkit): publish alphas with version hash (#33256)
Browse files Browse the repository at this point in the history
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*
  • Loading branch information
mrgrain authored Jan 31, 2025
1 parent c346e82 commit 0895fde
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/@aws-cdk/toolkit/build-tools/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@

version=${1:-latest}
reset=0.0.0
commit=$(git rev-parse --short HEAD)

# Toolkit package root
cd "$(dirname $(dirname "$0"))"

npm pkg set version=0.0.0-alpha.$commit
npm pkg set dependencies.@aws-cdk/cx-api=$version
npm pkg set dependencies.@aws-cdk/cloudformation-diff=$version
npm pkg set dependencies.@aws-cdk/region-info=$version
yarn package --private
npm pkg set version=$reset
npm pkg set dependencies.@aws-cdk/cx-api=$reset
npm pkg set dependencies.@aws-cdk/cloudformation-diff=$reset
npm pkg set dependencies.@aws-cdk/region-info=$reset
3 changes: 2 additions & 1 deletion packages/@aws-cdk/toolkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
".": {
"types": "./lib/index.d.ts",
"default": "./lib/index.js"
}
},
"./package.json": "./package.json"
},
"scripts": {
"awslint": "cdk-awslint",
Expand Down

0 comments on commit 0895fde

Please sign in to comment.