Skip to content

Commit

Permalink
chore(build): record preferred NPM publishing order (#13394)
Browse files Browse the repository at this point in the history
Use lerna to generate a topologically sorted list of `.tgz` files.

This list will be used during publishing to impose an order
on the package publishing actions.

Fixes #13221.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
rix0rrr authored Mar 4, 2021
1 parent 48963f7 commit 20a22fe
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@ for dir in $(find packages -name dist | grep -v node_modules | grep -v run-wrapp
rsync -a $dir/ ${distdir}/
done

# Record the dependency order of NPM packages into a file
# (This file will be opportunistically used during publishing)
#
# Manually sort 'aws-cdk' to the end, as the 'cdk init' command has implicit dependencies
# on other packages (that should not appear in 'package.json' and so
# there is no way to tell lerna about these).
for dir in $(lerna ls --toposort -p | grep -v packages/aws-cdk) $PWD/packages/aws-cdk; do
(cd $dir/dist/js && ls >> ${distdir}/js/npm-publish-order.txt) || true
done

# Remove a JSII aggregate POM that may have snuk past
rm -rf dist/java/software/amazon/jsii

Expand Down

0 comments on commit 20a22fe

Please sign in to comment.