Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
c204243b
提交
c204243b
authored
5月 07, 2012
作者:
Travis Cross
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
tagscript: reindent
上级
a511ff30
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
22 行增加
和
19 行删除
+22
-19
tagscript.sh
scripts/tagscript.sh
+22
-19
没有找到文件。
scripts/tagscript.sh
浏览文件 @
c204243b
#!/bin/bash
#!/bin/bash
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
##### release a version of FreeSWITCH
src_repo
=
"
$(
pwd
)
"
src_repo
=
"
$(
pwd
)
"
if
[
!
-d
.git
]
;
then
if
[
!
-d
.git
]
;
then
echo
"error: must be run from within the top level of a FreeSWITCH git tree."
1>&2
echo
"error: must be run from within the top level of a FreeSWITCH git tree."
1>&2
exit
1
;
exit
1
;
fi
fi
showusage
()
{
showusage
()
{
echo
"usage: ./scripts/tagscript.sh [-s] MAJOR.MINOR.MICRO[.REVISION]"
1>&2
echo
"usage: ./scripts/tagscript.sh [-s] MAJOR.MINOR.MICRO[.REVISION]"
1>&2
exit
1
;
exit
1
;
}
}
while
getopts
"s"
o
;
do
while
getopts
"s"
o
;
do
case
"
$o
"
in
case
"
$o
"
in
s
)
opts
=
"-s"
;;
s
)
opts
=
"-s"
;;
esac
esac
done
done
shift
$((
$OPTIND
-
1
))
shift
$((
$OPTIND
-
1
))
if
[
-z
"
$1
"
]
;
then
if
[
-z
"
$1
"
]
;
then
showusage
showusage
fi
fi
ver
=
"
$1
"
ver
=
"
$1
"
...
@@ -33,26 +35,26 @@ dst_name="freeswitch-$major.$minor.$micro"
...
@@ -33,26 +35,26 @@ dst_name="freeswitch-$major.$minor.$micro"
dst_dir
=
"
$src_repo
/../
$dst_name
"
dst_dir
=
"
$src_repo
/../
$dst_name
"
if
[
-d
"
$dst_dir
"
]
;
then
if
[
-d
"
$dst_dir
"
]
;
then
echo
"error: destination directory
$dst_dir
already exists."
1>&2
echo
"error: destination directory
$dst_dir
already exists."
1>&2
exit
1
;
exit
1
;
fi
fi
# save local changes
# save local changes
ret
=
$(
git stash save
"Save uncommitted changes before tagging."
)
ret
=
$(
git stash save
"Save uncommitted changes before tagging."
)
if
echo
$ret
|
grep
"^Saved"
;
then
if
echo
$ret
|
grep
"^Saved"
;
then
stash_saved
=
1
stash_saved
=
1
fi
fi
sed
-e
"s|
\(
AC_SUBST(SWITCH_VERSION_MAJOR,
\[\)
.*
\(\]
)
\)
|
\1
$major
\2
|"
\
sed
-e
"s|
\(
AC_SUBST(SWITCH_VERSION_MAJOR,
\[\)
.*
\(\]
)
\)
|
\1
$major
\2
|"
\
-e
"s|
\(
AC_SUBST(SWITCH_VERSION_MINOR,
\[\)
.*
\(\]
)
\)
|
\1
$minor
\2
|"
\
-e
"s|
\(
AC_SUBST(SWITCH_VERSION_MINOR,
\[\)
.*
\(\]
)
\)
|
\1
$minor
\2
|"
\
-e
"s|
\(
AC_SUBST(SWITCH_VERSION_MICRO,
\[\)
.*
\(\]
)
\)
|
\1
$micro
\2
|"
\
-e
"s|
\(
AC_SUBST(SWITCH_VERSION_MICRO,
\[\)
.*
\(\]
)
\)
|
\1
$micro
\2
|"
\
-e
"s|
\(
AC_INIT(
\[
freeswitch
\]
,
\[\)
.*
\(\]
, BUG-REPORT-ADDRESS)
\)
|
\1
$major
.
$minor
.
$micro
\2
|"
\
-e
"s|
\(
AC_INIT(
\[
freeswitch
\]
,
\[\)
.*
\(\]
, BUG-REPORT-ADDRESS)
\)
|
\1
$major
.
$minor
.
$micro
\2
|"
\
-i
configure.in
-i
configure.in
if
[
-n
"
$rev
"
]
;
then
if
[
-n
"
$rev
"
]
;
then
sed
-e
"s|
\(
AC_SUBST(SWITCH_VERSION_REVISION,
\[\)
.*
\(\]
)
\)
|
\1
$rev
\2
|"
\
sed
-e
"s|
\(
AC_SUBST(SWITCH_VERSION_REVISION,
\[\)
.*
\(\]
)
\)
|
\1
$rev
\2
|"
\
-e
"s|#
\(
AC_SUBST(SWITCH_VERSION_REVISION
\)
|
\1
|"
\
-e
"s|#
\(
AC_SUBST(SWITCH_VERSION_REVISION
\)
|
\1
|"
\
-i
configure.in
-i
configure.in
fi
fi
git add configure.in
git add configure.in
...
@@ -61,7 +63,7 @@ git tag -a ${opts} -m "freeswitch-$ver release" v$ver
...
@@ -61,7 +63,7 @@ git tag -a ${opts} -m "freeswitch-$ver release" v$ver
git clone
$src_repo
$dst_dir
git clone
$src_repo
$dst_dir
if
[
-n
"
$stash_saved
"
]
;
then
if
[
-n
"
$stash_saved
"
]
;
then
git stash pop
git stash pop
fi
fi
cd
$dst_dir
cd
$dst_dir
...
@@ -87,3 +89,4 @@ server (I didn't do that for you, as you might want to review first).
...
@@ -87,3 +89,4 @@ server (I didn't do that for you, as you might want to review first).
----------------------------------------------------------------------
----------------------------------------------------------------------
EOF
EOF
exit
0
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论