feat: add cyan

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
pull/462/head
Xinwei Xiong(cubxxw-openim) 1 year ago
parent 4e64888651
commit f4cef32b95

@ -75,17 +75,34 @@ print_separator
# Print time of submission # Print time of submission
print_color "PTIME: ${time}" "${BOLD_PREFIX}${CYAN_PREFIX}" print_color "PTIME: ${time}" "${BOLD_PREFIX}${CYAN_PREFIX}"
echo "" echo ""
Author=$(git config user.name) author=$(git config user.name)
Repository=$(basename -s .git $(git config --get remote.origin.url)) repository=$(basename -s .git $(git config --get remote.origin.url))
# Print additional information if needed # Print additional information if needed
print_color "Repository: ${repository}" "${BLUE_PREFIX}" print_color "Repository: ${repository}" "${BLUE_PREFIX}"
echo "" echo ""
print_color "Author: ${author}" "${PURPLE_PREFIX}" print_color "Author: ${author}" "${PURPLE_PREFIX}"
# Print section separator # Print section separator
print_separator print_separator
# 获取变更的文件列表
file_list=$(git diff --name-status HEAD @{u})
added_files=$(grep -c '^A' <<< "$file_list")
modified_files=$(grep -c '^M' <<< "$file_list")
deleted_files=$(grep -c '^D' <<< "$file_list")
# 打印变更的文件统计
print_color "Added Files: ${added_files}" "${YELLOW_PREFIX}"
print_color "Modified Files: ${modified_files}" "${YELLOW_PREFIX}"
print_color "Deleted Files: ${deleted_files}" "${YELLOW_PREFIX}"
# 获取最近一次提交的摘要信息
commit_message=$(git log -1 --pretty=format:"%s")
# 打印提交的摘要信息
print_color "Commit Message: ${commit_message}" "${YELLOW_PREFIX}"
# #
#printMessage "Running the Flutter analyzer" #printMessage "Running the Flutter analyzer"

Loading…
Cancel
Save