mirror of
https://github.com/ossrs/srs.git
synced 2025-02-15 04:42:04 +00:00
Merge branch 'srs.master'
This commit is contained in:
commit
574f02fe72
4 changed files with 164 additions and 95 deletions
42
README.md
42
README.md
|
@ -84,6 +84,29 @@ A big THANK YOU goes to:
|
||||||
* [FFMPEG](http://ffmpeg.org/) and [libx264](http://www.videolan.org/) group for SRS to use to transcode.
|
* [FFMPEG](http://ffmpeg.org/) and [libx264](http://www.videolan.org/) group for SRS to use to transcode.
|
||||||
* Guido van Rossum for creating Python for api-server for SRS.
|
* Guido van Rossum for creating Python for api-server for SRS.
|
||||||
|
|
||||||
|
## Mirrors
|
||||||
|
|
||||||
|
Github: [https://github.com/winlinvip/simple-rtmp-server](https://github.com/winlinvip/simple-rtmp-server)
|
||||||
|
[Git Usage](https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_Git)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/winlinvip/simple-rtmp-server.git
|
||||||
|
```
|
||||||
|
|
||||||
|
CSDN: [https://code.csdn.net/winlinvip/srs-csdn](https://code.csdn.net/winlinvip/srs-csdn)
|
||||||
|
[Git Usage](https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_Git)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://code.csdn.net/winlinvip/srs-csdn.git
|
||||||
|
```
|
||||||
|
|
||||||
|
OSChina: [http://git.oschina.net/winlinvip/srs.oschina](http://git.oschina.net/winlinvip/srs.oschina)
|
||||||
|
[Git Usage](https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_Git)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://git.oschina.net/winlinvip/srs.oschina.git
|
||||||
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
<strong>Step 1:</strong> get SRS
|
<strong>Step 1:</strong> get SRS
|
||||||
|
@ -133,23 +156,8 @@ Donation:<br/>
|
||||||
[http://www.ossrs.net/srs.release/donation/index.html](http://www.ossrs.net/srs.release/donation/index.html)
|
[http://www.ossrs.net/srs.release/donation/index.html](http://www.ossrs.net/srs.release/donation/index.html)
|
||||||
|
|
||||||
Donations:<br/>
|
Donations:<br/>
|
||||||
[https://github.com/winlinvip/simple-rtmp-server/blob/master/DONATIONS.txt](https://github.com/winlinvip/simple-rtmp-server/blob/master/DONATIONS.txt)
|
[https://github.com/winlinvip/simple-rtmp-server/blob/master/DONATIONS.txt]
|
||||||
|
(https://github.com/winlinvip/simple-rtmp-server/blob/master/DONATIONS.txt)
|
||||||
## Mirrors
|
|
||||||
|
|
||||||
Github: [https://github.com/winlinvip/simple-rtmp-server](https://github.com/winlinvip/simple-rtmp-server)
|
|
||||||
[Git Usage](https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_Git)
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git clone https://github.com/winlinvip/simple-rtmp-server.git
|
|
||||||
```
|
|
||||||
|
|
||||||
CSDN: [https://code.csdn.net/winlinvip/srs-csdn](https://code.csdn.net/winlinvip/srs-csdn)
|
|
||||||
[Git Usage](https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_Git)
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git clone https://code.csdn.net/winlinvip/srs-csdn.git
|
|
||||||
```
|
|
||||||
|
|
||||||
## System Requirements
|
## System Requirements
|
||||||
Supported operating systems and hardware:
|
Supported operating systems and hardware:
|
||||||
|
|
94
trunk/scripts/_mirror.utils.sh
Executable file
94
trunk/scripts/_mirror.utils.sh
Executable file
|
@ -0,0 +1,94 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#############################################
|
||||||
|
# help for the first checkout.
|
||||||
|
#############################################
|
||||||
|
function first_checkout()
|
||||||
|
{
|
||||||
|
mirror_name=$1
|
||||||
|
git_url=$2
|
||||||
|
project_dir=$3
|
||||||
|
sync_script=$4
|
||||||
|
|
||||||
|
failed_msg "当前分支不是${mirror_name}镜像";
|
||||||
|
|
||||||
|
cat <<END
|
||||||
|
创建${mirror_name}镜像的过程如下:
|
||||||
|
1. 在${mirror_name}上创建项目,
|
||||||
|
可创建空项目,或从https://github.com/winlinvip/simple-rtmp-server拷贝过来。
|
||||||
|
2. 在本地虚拟机上:
|
||||||
|
git clone $git_url
|
||||||
|
cd $project_dir && git checkout master && git branch 1.0release && git push origin 1.0release
|
||||||
|
3. 创建同步的branch:
|
||||||
|
git remote add upstream https://github.com/winlinvip/simple-rtmp-server.git
|
||||||
|
git fetch upstream
|
||||||
|
git checkout upstream/master -b srs.master
|
||||||
|
git checkout upstream/1.0release -b srs.1.0release
|
||||||
|
4. 执行本同步更新脚本,更新。
|
||||||
|
bash $sync_script
|
||||||
|
END
|
||||||
|
}
|
||||||
|
|
||||||
|
#############################################
|
||||||
|
# branch master
|
||||||
|
#############################################
|
||||||
|
function sync_master()
|
||||||
|
{
|
||||||
|
for ((;;)); do
|
||||||
|
git checkout srs.master && git pull
|
||||||
|
ret=$?; if [[ 0 -ne $ret ]]; then
|
||||||
|
failed_msg "(master)更新github分支失败,自动重试";
|
||||||
|
continue
|
||||||
|
else
|
||||||
|
ok_msg "(master)更新github分支成功"
|
||||||
|
fi
|
||||||
|
break
|
||||||
|
done
|
||||||
|
|
||||||
|
git checkout master && git merge srs.master
|
||||||
|
ret=$?; if [[ 0 -ne $ret ]]; then failed_msg "(master)合并github分支失败, ret=$ret"; exit $ret; fi
|
||||||
|
ok_msg "(master)合并github分支成功"
|
||||||
|
}
|
||||||
|
|
||||||
|
#############################################
|
||||||
|
# branch 1.0release
|
||||||
|
#############################################
|
||||||
|
function sync_1_0_release()
|
||||||
|
{
|
||||||
|
for ((;;)); do
|
||||||
|
git checkout srs.1.0release && git pull
|
||||||
|
ret=$?; if [[ 0 -ne $ret ]]; then
|
||||||
|
failed_msg "(1.0release)更新github分支失败,自动重试";
|
||||||
|
continue
|
||||||
|
else
|
||||||
|
ok_msg "(1.0release)更新github分支成功"
|
||||||
|
fi
|
||||||
|
break
|
||||||
|
done
|
||||||
|
|
||||||
|
git checkout 1.0release && git merge srs.1.0release
|
||||||
|
ret=$?; if [[ 0 -ne $ret ]]; then failed_msg "(1.0release)合并github分支失败, ret=$ret"; exit $ret; fi
|
||||||
|
ok_msg "(1.0release)合并github分支成功"
|
||||||
|
}
|
||||||
|
|
||||||
|
#############################################
|
||||||
|
# push
|
||||||
|
#############################################
|
||||||
|
function sync_push()
|
||||||
|
{
|
||||||
|
mirror_name=$1
|
||||||
|
|
||||||
|
for ((;;)); do
|
||||||
|
git push
|
||||||
|
ret=$?; if [[ 0 -ne $ret ]]; then
|
||||||
|
failed_msg "提交${mirror_name}分支失败,自动重试";
|
||||||
|
continue
|
||||||
|
else
|
||||||
|
ok_msg "提交${mirror_name}分支成功"
|
||||||
|
fi
|
||||||
|
break
|
||||||
|
done
|
||||||
|
|
||||||
|
git checkout master
|
||||||
|
ok_msg "${mirror_name}同步git成功"
|
||||||
|
}
|
|
@ -2,17 +2,6 @@
|
||||||
|
|
||||||
echo "更新CSDN镜像的脚本"
|
echo "更新CSDN镜像的脚本"
|
||||||
|
|
||||||
# 创建CSDN镜像的过程如下:
|
|
||||||
# 1. 在CSDN上创建项目,从https://github.com/winlinvip/simple-rtmp-server拷贝过来。
|
|
||||||
# 2. 在本地虚拟机上:
|
|
||||||
# git clone git@code.csdn.net:winlinvip/srs-csdn.git
|
|
||||||
# 3. 创建同步的branch:
|
|
||||||
# git remote add upstream https://github.com/winlinvip/simple-rtmp-server.git
|
|
||||||
# git fetch upstream
|
|
||||||
# git checkout upstream/master -b srs.master
|
|
||||||
# 4. 执行本同步更新脚本,更新。
|
|
||||||
# bash scripts/csdn.mirror.sh
|
|
||||||
|
|
||||||
echo "argv[0]=$0"
|
echo "argv[0]=$0"
|
||||||
if [[ ! -f $0 ]]; then
|
if [[ ! -f $0 ]]; then
|
||||||
echo "directly execute the scripts on shell.";
|
echo "directly execute the scripts on shell.";
|
||||||
|
@ -31,77 +20,18 @@ cd $work_dir
|
||||||
ret=$?; if [[ $ret -ne 0 ]]; then exit $ret; fi
|
ret=$?; if [[ $ret -ne 0 ]]; then exit $ret; fi
|
||||||
ok_msg "导入脚本成功"
|
ok_msg "导入脚本成功"
|
||||||
|
|
||||||
|
source $work_dir/scripts/_mirror.utils.sh
|
||||||
|
|
||||||
git remote -v|grep code.csdn.net >/dev/null 2>&1
|
git remote -v|grep code.csdn.net >/dev/null 2>&1
|
||||||
ret=$?; if [[ 0 -ne $ret ]]; then
|
ret=$?; if [[ 0 -ne $ret ]]; then
|
||||||
failed_msg "当前分支不是CSDN镜像";
|
first_checkout "CSDN" \
|
||||||
cat <<END
|
"git@code.csdn.net:winlinvip/srs-csdn.git" \
|
||||||
创建CSDN镜像的过程如下:
|
"srs-csdn" "$work_dir/scripts/csdn.mirror.sh"
|
||||||
1. 在CSDN上创建项目,从https://github.com/winlinvip/simple-rtmp-server拷贝过来。
|
|
||||||
2. 在本地虚拟机上:
|
|
||||||
git clone git@code.csdn.net:winlinvip/srs-csdn.git
|
|
||||||
git checkout master && git branch 1.0release && git push origin 1.0release
|
|
||||||
3. 创建同步的branch:
|
|
||||||
git remote add upstream https://github.com/winlinvip/simple-rtmp-server.git
|
|
||||||
git fetch upstream
|
|
||||||
git checkout upstream/master -b srs.master
|
|
||||||
git checkout upstream/1.0release -b srs.1.0release
|
|
||||||
4. 执行本同步更新脚本,更新。
|
|
||||||
bash scripts/csdn.mirror.sh
|
|
||||||
END
|
|
||||||
exit 0;
|
exit 0;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#############################################
|
sync_master
|
||||||
# branch master
|
sync_1_0_release
|
||||||
#############################################
|
sync_push "CSDN"
|
||||||
for ((;;)); do
|
|
||||||
git checkout srs.master && git pull
|
|
||||||
ret=$?; if [[ 0 -ne $ret ]]; then
|
|
||||||
failed_msg "(master)更新github分支失败,自动重试";
|
|
||||||
continue
|
|
||||||
else
|
|
||||||
ok_msg "(master)更新github分支成功"
|
|
||||||
fi
|
|
||||||
break
|
|
||||||
done
|
|
||||||
|
|
||||||
git checkout master && git merge srs.master
|
|
||||||
ret=$?; if [[ 0 -ne $ret ]]; then failed_msg "(master)合并github分支失败, ret=$ret"; exit $ret; fi
|
|
||||||
ok_msg "(master)合并github分支成功"
|
|
||||||
|
|
||||||
#############################################
|
|
||||||
# branch 1.0release
|
|
||||||
#############################################
|
|
||||||
for ((;;)); do
|
|
||||||
git checkout srs.1.0release && git pull
|
|
||||||
ret=$?; if [[ 0 -ne $ret ]]; then
|
|
||||||
failed_msg "(1.0release)更新github分支失败,自动重试";
|
|
||||||
continue
|
|
||||||
else
|
|
||||||
ok_msg "(1.0release)更新github分支成功"
|
|
||||||
fi
|
|
||||||
break
|
|
||||||
done
|
|
||||||
|
|
||||||
git checkout 1.0release && git merge srs.1.0release
|
|
||||||
ret=$?; if [[ 0 -ne $ret ]]; then failed_msg "(1.0release)合并github分支失败, ret=$ret"; exit $ret; fi
|
|
||||||
ok_msg "(1.0release)合并github分支成功"
|
|
||||||
|
|
||||||
#############################################
|
|
||||||
# push
|
|
||||||
#############################################
|
|
||||||
|
|
||||||
for ((;;)); do
|
|
||||||
git push
|
|
||||||
ret=$?; if [[ 0 -ne $ret ]]; then
|
|
||||||
failed_msg "提交CSDN分支失败,自动重试";
|
|
||||||
continue
|
|
||||||
else
|
|
||||||
ok_msg "提交CSDN分支成功"
|
|
||||||
fi
|
|
||||||
break
|
|
||||||
done
|
|
||||||
|
|
||||||
ok_msg "CSDN同步git成功"
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
37
trunk/scripts/oschina.mirror.sh
Executable file
37
trunk/scripts/oschina.mirror.sh
Executable file
|
@ -0,0 +1,37 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "更新OSChina镜像的脚本"
|
||||||
|
|
||||||
|
echo "argv[0]=$0"
|
||||||
|
if [[ ! -f $0 ]]; then
|
||||||
|
echo "directly execute the scripts on shell.";
|
||||||
|
work_dir=`pwd`
|
||||||
|
else
|
||||||
|
echo "execute scripts in file: $0";
|
||||||
|
work_dir=`dirname $0`; work_dir=`(cd ${work_dir} && pwd)`
|
||||||
|
fi
|
||||||
|
work_dir=`(cd ${work_dir}/.. && pwd)`
|
||||||
|
product_dir=$work_dir
|
||||||
|
|
||||||
|
# allow start script from any dir
|
||||||
|
cd $work_dir
|
||||||
|
|
||||||
|
. ${product_dir}/scripts/_log.sh
|
||||||
|
ret=$?; if [[ $ret -ne 0 ]]; then exit $ret; fi
|
||||||
|
ok_msg "导入脚本成功"
|
||||||
|
|
||||||
|
source $work_dir/scripts/_mirror.utils.sh
|
||||||
|
|
||||||
|
git remote -v|grep git.oschina.net >/dev/null 2>&1
|
||||||
|
ret=$?; if [[ 0 -ne $ret ]]; then
|
||||||
|
first_checkout "OSChina" \
|
||||||
|
"git@git.oschina.net:winlinvip/srs.oschina.git" \
|
||||||
|
"srs.oschina" "$work_dir/scripts/oschina.mirror.sh"
|
||||||
|
exit 0;
|
||||||
|
fi
|
||||||
|
|
||||||
|
sync_master
|
||||||
|
sync_1_0_release
|
||||||
|
sync_push "OSChina"
|
||||||
|
|
||||||
|
exit 0
|
Loading…
Reference in a new issue