This repository was archived by the owner on Oct 4, 2022. It is now read-only.
Commit 1aaf068 1 parent 8e4a3d2 commit 1aaf068 Copy full SHA for 1aaf068
File tree 2 files changed +35
-1
lines changed
2 files changed +35
-1
lines changed Original file line number Diff line number Diff line change 18
18
"test" : " lerna run test --stream" ,
19
19
"install-ci" : " lerna run install-ci" ,
20
20
"link-all" : " lerna exec yarn link" ,
21
- "unlink-all" : " lerna exec yarn unlink"
21
+ "unlink-all" : " lerna exec yarn unlink" ,
22
+ "transfer-branch" : " ./transfer-branch.sh"
22
23
}
23
24
}
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -ex;
4
+
5
+ PACKAGE=$1
6
+ BASE_BRANCH=$2
7
+ MERGING_BRANCH=$3
8
+
9
+ if [ -z " $MERGING_BRANCH " ]; then
10
+ echo " Usage: yarn transfer-branch [package] [base-branch] [merging-branch]" ;
11
+ exit 1;
12
+ fi
13
+
14
+ case $PACKAGE in
15
+ " yoastseo" )
16
+ ORIGINAL_REPOSITORY=https://github.com/Yoast/YoastSEO.js.git
17
+ ;;
18
+ " yoast-components" )
19
+ ORIGINAL_REPOSITORY=https://github.com/Yoast/yoast-components.git
20
+ ;;
21
+ esac
22
+
23
+ if [ -z " $ORIGINAL_REPOSITORY " ]; then
24
+ echo " Error: Unknown package" ;
25
+ exit 1;
26
+ fi
27
+
28
+ echo $ORIGINAL_REPOSITORY ;
29
+
30
+ git checkout $BASE_BRANCH
31
+ git checkout -b $MERGING_BRANCH
32
+
33
+ git subtree pull --prefix=packages/$PACKAGE $ORIGINAL_REPOSITORY $MERGING_BRANCH
You can’t perform that action at this time.
0 commit comments