1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Refine the signaling dynamic images.

This commit is contained in:
winlin 2022-05-16 22:18:51 +08:00
parent 2633f03954
commit ec5bdc7dfa
6 changed files with 32 additions and 72 deletions

27
trunk/3rdparty/signaling/auto/pub.sh vendored Executable file
View file

@ -0,0 +1,27 @@
#!/bin/bash
REALPATH=$(realpath $0)
WORK_DIR=$(cd $(dirname $REALPATH)/.. && pwd)
echo "Run pub at $WORK_DIR from $0"
cd $WORK_DIR
git st |grep -q 'nothing to commit'
if [[ $? -ne 0 ]]; then
echo "Failed: Please commit before release";
exit 1
fi
RELEASE=$(git describe --tags --abbrev=0 --exclude release-*)
REVISION=$(echo $RELEASE|awk -F . '{print $3}')
let NEXT=$REVISION+1
echo "Last release is $RELEASE, revision is $REVISION, next is $NEXT"
TAG="v1.0.$NEXT"
echo "publish $TAG"
git push
git tag -d $TAG 2>/dev/null && git push origin :$TAG
git tag $TAG
git push origin $TAG
echo "publish $TAG ok"
echo " https://github.com/ossrs/signaling/actions"

View file

@ -1,70 +0,0 @@
#!/bin/bash
SRS_GIT=$HOME/git/signaling
SRS_TAG=
# linux shell color support.
RED="\\033[31m"
GREEN="\\033[32m"
YELLOW="\\033[33m"
BLACK="\\033[0m"
function NICE() {
echo -e "${GREEN}$@${BLACK}"
}
function TRACE() {
echo -e "${BLACK}$@${BLACK}"
}
function WARN() {
echo -e "${YELLOW}$@${BLACK}"
}
function ERROR() {
echo -e "${RED}$@${BLACK}"
}
##################################################################################
##################################################################################
##################################################################################
if [[ -z $SRS_TAG ]]; then
SRS_TAG=`(cd $SRS_GIT && git describe --tags --abbrev=0 --exclude release-* 2>/dev/null)`
if [[ $? -ne 0 ]]; then
echo "Invalid tag $SRS_TAG of $SRS_FILTER in $SRS_GIT"
exit -1
fi
fi
NICE "Build docker for $SRS_GIT, tag is $SRS_TAG"
git ci -am "Release $SRS_TAG"
# For aliyun hub.
NICE "aliyun hub release-v$SRS_TAG"
echo "git push aliyun"
git push aliyun
git tag -d release-v$SRS_TAG 2>/dev/null
echo "Cleanup tag $SRS_TAG for aliyun"
git tag release-v$SRS_TAG; git push -f aliyun release-v$SRS_TAG
echo "Create new tag $SRS_TAG for aliyun"
echo ""
NICE "aliyun hub release-vlatest"
git tag -d release-vlatest 2>/dev/null
echo "Cleanup tag latest for aliyun"
git tag release-vlatest; git push -f aliyun release-vlatest
echo "Create new tag latest for aliyun"
# For github.com
echo "git push origin"
git push origin
echo "git push origin $SRS_TAG"
git push origin $SRS_TAG
NICE "Update github ok"