1 Star 0 Fork 0

thinkphpdev/project_8701307

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
gen_git_commit_h.sh 328 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/bin/sh
commit=$(git rev-parse HEAD)
git diff-index --quiet HEAD
dirty=$?
printf "#pragma once\n#define GIT_COMMIT \"$commit\"\n#define GIT_DIRTY $dirty\n" > auto/git_info.h.new
if cmp -s auto/git_info.h.new auto/git_info.h 2>&1 > /dev/null
then
rm -f auto/git_info.h.new
else
mv -f auto/git_info.h.new auto/git_info.h
fi
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/tpdev/td.git
git@gitee.com:tpdev/td.git
tpdev
td
project_8701307
master

搜索帮助