File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 3939 steps :
4040 - name : Checkout
4141 uses : actions/checkout@v5
42+ - name : Rename patch-package files to match updated versions
43+ shell : bash
44+ run : |
45+ get_version() {
46+ jq -r ".dependencies[\"$1\"] // .devDependencies[\"$1\"]" package.json
47+ }
48+
49+ for PATCH in patches/*.patch; do
50+ BASE=$(basename "$PATCH" .patch)
51+
52+ # Convert patch filename back to package name
53+ PACKAGE=$(echo "$BASE" | sed 's/+/\\//g')
54+
55+ VERSION=$(get_version "$PACKAGE")
56+ if [ "$VERSION" == "null" ]; then
57+ echo "Skipping $PACKAGE — not found in package.json"
58+ continue
59+ fi
60+
61+ NEW_NAME=$(echo "$PACKAGE" | sed 's/\//+/g')"+${VERSION}.patch"
62+ if [ "$BASE.patch" != "$NEW_NAME" ]; then
63+ echo "Renaming $BASE.patch -> $NEW_NAME"
64+ git mv "$PATCH" "patches/$NEW_NAME"
65+ fi
66+ done
4267 - name : Automerge Dependabot PRs if all checks have passed
4368 shell : bash
4469 env :
You can’t perform that action at this time.
0 commit comments