|
1 | 1 | #!/bin/bash
|
2 | 2 |
|
3 |
| -ROOT_DIR=$(pwd) |
4 |
| - |
5 |
| -echo "Syncing apexcharts..." |
6 |
| -cd ./packages/apexcharts |
7 |
| -git fetch upstream |
8 |
| -git merge --no-edit upstream/main |
9 |
| -git push origin main |
10 |
| -jq '.scripts["dev-no-watch:umd"] = "rollup -c build/config.js --environment TARGET:web-umd-dev"' ./package.json > tmp.json && mv tmp.json ./package.json |
| 3 | +ROOT_DIR="$(pwd)" |
| 4 | + |
| 5 | +echo "Syncing apexcharts from upstream-apexcharts..." |
| 6 | + |
| 7 | +# 1) upstream-apexcharts의 main 브랜치에서 packages/apexcharts에 반영 |
| 8 | +git subtree pull --prefix=packages/apexcharts upstream-apexcharts main |
| 9 | + |
| 10 | +# 2) fork(origin) 레포에 push |
| 11 | +git subtree push --prefix=packages/apexcharts origin-apexcharts main |
| 12 | + |
| 13 | +# 3) package.json 수정 |
| 14 | +echo "Applying local changes (package.json) for apexcharts..." |
| 15 | +jq '.scripts["dev-no-watch:umd"] = "rollup -c build/config.js --environment TARGET:web-umd-dev"' \ |
| 16 | + packages/apexcharts/package.json > tmp.json && mv tmp.json packages/apexcharts/package.json |
| 17 | + |
11 | 18 | echo "apexcharts synced."
|
12 | 19 |
|
13 |
| -echo "Syncing react-apexcharts..." |
14 |
| -cd ../react-apexcharts |
15 |
| -git fetch upstream |
16 |
| -git merge --no-edit upstream/master |
17 |
| -git push origin master |
18 |
| -jq '.peerDependencies.apexcharts = "workspace:*"' ./package.json > tmp.json && mv tmp.json ./package.json |
| 20 | +echo "Syncing react-apexcharts from upstream-react-apexcharts..." |
| 21 | + |
| 22 | +# 1) upstream-react-apexcharts의 master 브랜치에서 packages/react-apexcharts에 반영 |
| 23 | +git subtree pull --prefix=packages/react-apexcharts upstream-react-apexcharts master |
| 24 | + |
| 25 | +# 2) fork(origin) 레포에 push |
| 26 | +git subtree push --prefix=packages/react-apexcharts origin-react-apexcharts master |
| 27 | + |
| 28 | +# 3) package.json 수정 |
| 29 | +echo "Applying local changes (package.json) for react-apexcharts..." |
| 30 | +jq '.peerDependencies.apexcharts = "workspace:*"' \ |
| 31 | + packages/react-apexcharts/package.json > tmp.json && mv tmp.json packages/react-apexcharts/package.json |
| 32 | + |
19 | 33 | echo "react-apexcharts synced."
|
20 | 34 |
|
21 | 35 | cd "$ROOT_DIR"
|
| 36 | +echo "All done." |
0 commit comments