hyperf/bin/split.sh
李铭昕 3b097dc70a
Upgrade friendsofphp/php-cs-fixer to ^3.0 (#3566)
* Upgrade friendsofphp/php-cs-fixer to ^3.0 and format code

* Rename barnch  to 2.2

* Create CHANGELOG-2.2.md
2021-05-11 12:18:49 +08:00

32 lines
480 B
Bash
Executable File

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