加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/esnet/iperf
克隆/下载
make_release 1.13 KB
一键复制 编辑 原始数据 按行查看 历史
swlars 提交于 2024-05-13 11:40 . Remove signing requirement for git tags
#!/bin/sh
proj="iperf"
if [ "x$2" != "x" ]; then
tag=$2
else
tag=`awk '/IPERF_VERSION / {
gsub(/"/, "", $3);
print $3 }' src/version.h`
fi
dirname=`echo "$tag $proj" | awk '{
gsub(/-ALPHA/, "a", $1);
gsub(/-BETA/, "b", $1);
gsub(/-RELEASE/, "", $1);
print $2"-"$1 }'`
echo tag $tag
echo dirname $dirname
do_tag ()
{
git tag -m "tagging $tag" "$tag"
}
do_tar ()
{
tarball=${dirname}.tar.gz
rm -f "${tarball}"
git archive --format=tar --prefix "${dirname}/" "${tag}" | gzip -9 > "${tarball}"
# Compute SHA256 hash
case `uname -s` in
FreeBSD) sha=sha256 ;;
Linux) sha=sha256sum ;;
Darwin) sha="shasum -a 256" ;;
*) sha=echo ;;
esac
${sha} "${tarball}" | tee "${tarball}.sha256"
}
usage ()
{
cat <<EOF
$0: tag|tar
tag -- create a tag
tar -- create a tarball from a tag
General use is to do:
./$0 tag
./$0 tar
An optional argument may be specified to both the tag and tar
subcommands to explicitly specify a tag string. If not specified, the
contents of src/version.h are used.
EOF
}
case $1 in
tag) do_tag ;;
tar) do_tar ;;
*) echo "unknown command: $1"; usage ;;
esac
exit
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化