perf: 分包中增加 readme

This commit is contained in:
daodao97
2020-06-17 23:45:36 +08:00
parent 6175f71009
commit fa877fe7a3
12 changed files with 60 additions and 33 deletions

30
bin/split.sh Executable file
View File

@@ -0,0 +1,30 @@
#!/usr/bin/env bash
set -e
set -x
CURRENT_BRANCH="master"
BASEPATH=$(cd `dirname $0`; cd ../src/; pwd)
REPOS=$@
function split()
{
SHA1=`splitsh-lite --prefix=$1`
git push $2 "$SHA1:refs/heads/$CURRENT_BRANCH" -f
}
function remote()
{
git remote add $1 $2 || true
}
if [[ $# -eq 0 ]]; then
REPOS=$(ls $BASEPATH)
fi
for REPO in $REPOS ; do
remote $REPO git@github.com:hyperf-admin/$REPO.git
split "src/$REPO" $REPO
done
git pull origin $CURRENT_BRANCH