-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(pacmak): support jsii-rosetta 5.7 #4718
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. re-ordered some package because automated tooling is sorting the packages |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
#------------------------------------------------------------------------ | ||
# updates all package.json files to the latest jsii | ||
# and jsii-rosetta versions | ||
# updates the jsii-pacmak peer dep to the latest supported version | ||
# updates the build matrix in the .github/workflows/main.yml file | ||
#------------------------------------------------------------------------ | ||
set -euo pipefail | ||
scriptdir=$(cd $(dirname $0) && pwd) | ||
|
||
# go to repo root | ||
cd ${scriptdir}/.. | ||
|
||
# load version data | ||
tomorrow=$(date -v+1d +%s) | ||
supported=$(curl -sS https://raw.githubusercontent.com/aws/jsii-rosetta/refs/heads/main/releases.json |\ | ||
jq "(.maintenance | to_entries | sort_by(.value) | .[] | select(.value | .[0:19] +\"Z\" | fromdateiso8601 >= $tomorrow) | .key), .current") | ||
latest=$(echo $supported | jq -sr '.[-1]') | ||
oldest=$(echo $supported | jq -sr '.[0]') | ||
|
||
echo "Latest supported jsii & jsii-rosetta version: $latest" | ||
echo "Oldest supported jsii & jsii-rosetta version: $oldest" | ||
echo "" | ||
|
||
# Set jsii-pacmak minimal dependency | ||
echo "Updating jsii-pacmak peerDependency to >=$oldest.0" | ||
echo "" | ||
npm --prefix packages/jsii-pacmak pkg set peerDependencies.jsii-rosetta=">=$oldest.0" | ||
|
||
# GitHub Actions | ||
matrix=$(echo $supported | jq -rs '["latest"] + map(. + ".x") | @csv') | ||
echo "Updating GitHub Actions workflow to run jsii-pacmak integration tests for $matrix" | ||
echo "" | ||
yq -i ".jobs.pacmak-integration-test.strategy.matrix.rosetta = [$matrix]" .github/workflows/main.yml | ||
|
||
# update jsii and jsii-rosetta versions | ||
echo "Upgrading jsii & jsii-rosetta to latest" | ||
echo "" | ||
npx lerna exec --parallel ncu -- --upgrade --target=latest --dep=prod,dev --filter=jsii,jsii-rosetta |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed whitespace because
yq
cannot deal with that and will remove it.