20 Star 78 Fork 27

Gitee 极速下载/xiaomi-gaea

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/XiaoMi/Gaea
克隆/下载
gen_version.sh 1.07 KB
一键复制 编辑 原始数据 按行查看 历史
黄锦钦 提交于 2023-03-09 07:43 . add gaea admin api for gaea version
#!/bin/bash
ROOT="$(pwd)"
if BUILD_GIT_REVISION=$(git rev-parse HEAD 2> /dev/null); then if ! git diff-index --quiet HEAD; then BUILD_GIT_REVISION=${BUILD_GIT_REVISION}"-dirty"
fi
else
BUILD_GIT_REVISION=unknown
fi
# Check for local changes
if git diff-index --quiet HEAD --; then
tree_status="Clean"
else
tree_status="Modified"
fi
# Check for git branch and git dirty
BRANCH=$(git rev-parse --abbrev-ref HEAD)
GIT_DIRTY=$(git diff --no-ext-diff 2> /dev/null | wc -l)
# XXX This needs to be updated to accommodate tags added after building, rather than prior to builds
RELEASE_TAG=$(git describe)
# security wanted VERSION='unknown'
VERSION="${BUILD_GIT_REVISION}"
if [[ -n "${RELEASE_TAG}" ]]; then
VERSION="${RELEASE_TAG}"
fi
# used by core/version
echo buildVersion "${VERSION}"
echo buildGitRevision "${BUILD_GIT_REVISION}"
echo buildUser "$(whoami)"
echo buildHost "$(hostname -f)"
echo buildStatus "${tree_status}"
echo buildTime "$(date +%Y-%m-%d--%T)"
echo buildBranch "${BRANCH}"
echo buildGitDirty "${GIT_DIRTY}"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors/xiaomi-gaea.git
[email protected]:mirrors/xiaomi-gaea.git
mirrors
xiaomi-gaea
xiaomi-gaea
master

搜索帮助