Levitate: Update workflow to find type declaration via package.json (#53539)

* refactor(breaking-changes): make sure to pack and zip tarballed packages before artifact upload

* feat(check-breaking-changes): support extracting npm package tarballs before comparing packages

* chore(breaking-changes): fix typo preventing upload of pr_built_packages.zip
This commit is contained in:
Jack Westbrook
2022-08-11 15:17:51 +02:00
committed by GitHub
parent da72a4ed2e
commit b1ce721cf1
2 changed files with 20 additions and 8 deletions

View File

@ -12,14 +12,20 @@ while IFS=" " read -r -a package; do
PACKAGE_PATH=$(basename "$package")
# Calculate current and previous package paths / names
PREV="./base/packages/$PACKAGE_PATH/dist/"
CURRENT="./pr/packages/$PACKAGE_PATH/dist/"
PREV="./base/$PACKAGE_PATH"
CURRENT="./pr/$PACKAGE_PATH"
# Temporarily skipping these packages as they don't have any exposed static typing
if [[ "$PACKAGE_PATH" == 'grafana-toolkit' || "$PACKAGE_PATH" == 'jaeger-ui-components' ]]; then
continue
fi
# Extract the npm package tarballs into separate directories e.g. ./base/@grafana-data.tgz -> ./base/grafana-data/
mkdir $PREV
tar -xf ./base/@$PACKAGE_PATH.tgz --strip-components=1 -C $PREV
mkdir $CURRENT
tar -xf ./pr/@$PACKAGE_PATH.tgz --strip-components=1 -C $CURRENT
# Run the comparison and record the exit code
echo ""
echo ""