Ai
4 Star 1 Fork 0

Gitee 极速下载/luakit

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/luakit/luakit
克隆/下载
getversion.sh 1.41 KB
一键复制 编辑 原始数据 按行查看 历史
c0dev0id 提交于 2025-01-03 17:55 +08:00 . build: fix build within a git worktree checkout
#!/bin/sh
# Get the current version using various methods.
# The following will serve as a fallback version string (which is the short
# hash of the latest commit before the application was packaged (if it was
# packaged)). You will find that this file is listed inside the .gitattributes
# file like so:
#
# ./build-utils/getversion.sh export-subst
#
# This tells git to replace the format string in the following line with the
# current hash upon the calling of the `git archive <hash/tag>` command.
VERSION_FROM_ARCHIVE=$Format:%H$
# The preferred method is to use the git describe command but this is only
# possible if the .git directory is present.
if [ -d .git -a -r .git ]
then
VERSION_FROM_GIT=`git describe --tags --always`
fi
# In case of a worktree checkout, there is not .git directory, but a
# .git file, which contains the path to the branch information within
# the git repository. In this case, "git describe" works too.
if [ -f .git -a -r .git ] && grep -q ^gitdir .git
then
VERSION_FROM_GIT=`git describe --tags --always`
fi
if [ x"$VERSION_FROM_GIT" != x ]; then
echo $VERSION_FROM_GIT; exit 0;
fi
if [ "$VERSION_FROM_ARCHIVE" != ':%H$' ]; then
echo $VERSION_FROM_ARCHIVE | cut -b1-8; exit 0;
fi
echo "ERROR: Git commit hash detection failed: Please check why "
"build-utils/getversion.sh is failing in your setup and get in touch with us." >&2
exit 2
# vim: ft=sh:et:sw=4:ts=8:sts=4:tw=80
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors/luakit.git
git@gitee.com:mirrors/luakit.git
mirrors
luakit
luakit
develop

搜索帮助