Last active
October 26, 2020 01:13
-
-
Save brandonbloom/02625d29b614f9bffd5c1a9693fadfef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -ex | |
repos=' | |
animate | |
cascader | |
checkbox | |
collapse | |
dialog | |
drawer | |
dropdown | |
field-form | |
image | |
input-number | |
mentions | |
menu | |
motion | |
notification | |
pagination | |
picker | |
progress | |
rate | |
resize-observer | |
select | |
slider | |
steps | |
switch | |
table | |
tabs | |
textarea | |
tooltip | |
tree | |
tree-select | |
trigger | |
upload | |
util | |
' | |
for repo in $repos; do | |
pkg="rc-$repo" | |
[ ! -d $pkg ] && git clone [email protected]:react-component/$repo.git $pkg | |
( | |
cd $pkg | |
gh repo fork --remote | |
git checkout master | |
git fetch upstream | |
git reset --hard upstream/master | |
git b -D react-peer-dependencies || true | |
git checkout -b react-peer-dependencies | |
jq '.peerDependencies += { | |
react: .devDependencies.react, | |
"react-dom": .devDependencies."react-dom" | |
}' package.json > package.json-new | |
mv package.json-new package.json | |
git --no-pager diff | |
git commit -a \ | |
-m 'Add react and react-dom as peer dependencies' \ | |
-m 'Fixes errors using Yarn 2 (berry).' \ | |
-m 'See https://github.com/ant-design/ant-design/issues/27339 for details.' | |
git push -f origin react-peer-dependencies | |
gh pr create --fill --base master | |
) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment