Skip to content

Commit aacd793

Browse files
[chore] Change shell to no symbolic link ver
1 parent 8cc7c63 commit aacd793

File tree

4 files changed

+47
-30
lines changed

4 files changed

+47
-30
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"apps/*"
88
],
99
"scripts": {
10-
"add-upstream": "./scripts/add-upstream.sh",
10+
"add-remote": "./scripts/add-remote.sh",
1111
"sync-fork": "./scripts/sync-fork.sh",
1212
"package-change-watch": "./shell/package-change-watch.sh",
1313
"run": "yarn workspace react-test dev",

scripts/add-remote.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
ROOT_DIR=$(pwd)
4+
5+
echo "Adding remotes for apexcharts.js and react-apexcharts in monorepo..."
6+
7+
git remote add origin https://github.com/Invincible-Study-Soru/apexchart-contribution.git || echo "origin already exists for monorepo"
8+
9+
git remote add origin-apexcharts https://github.com/Invincible-Study-Soru/apexcharts.js.git || echo "origin for apexcharts already exists"
10+
git remote add upstream-apexcharts https://github.com/apexcharts/apexcharts.js.git || echo "upstream for apexcharts already exists"
11+
12+
git remote add origin-react-apexcharts https://github.com/Invincible-Study-Soru/react-apexcharts.git || echo "origin for react-apexcharts already exists"
13+
git remote add upstream-react-apexcharts https://github.com/apexcharts/react-apexcharts.git || echo "upstream for react-apexcharts already exists"
14+
15+
echo "Remotes added successfully."
16+
17+
cd "$ROOT_DIR"

scripts/add-upstream.sh

Lines changed: 0 additions & 15 deletions
This file was deleted.

scripts/sync-fork.sh

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,36 @@
11
#!/bin/bash
22

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+
1118
echo "apexcharts synced."
1219

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+
1933
echo "react-apexcharts synced."
2034

2135
cd "$ROOT_DIR"
36+
echo "All done."

0 commit comments

Comments
 (0)