更新 justfile
ci/woodpecker/push/ci-test Pipeline was successful

This commit is contained in:
2026-03-30 14:09:41 +08:00
parent 830310d8e5
commit abfd83ac99
+12 -6
View File
@@ -16,14 +16,20 @@ machine_ip := `ip -4 addr show scope global | grep -oP '(?<=inet\s)\d+(\.\d+){3}
git reset --soft HEAD~1 && echo "✅ 空提交已删除"; \ git reset --soft HEAD~1 && echo "✅ 空提交已删除"; \
fi fi
# 将所有文件 amend # 将所有文件 amend,若取消则将暂存区文件移出
amend argument="": @amend:
cd "{{root}}" && git add . && git commit --amend {{argument}} cd "{{root}}" && git add . && git commit --amend || (git restore --staged . && false)
# 统计代码量 # 列出所有已合并到当前分支(这里指定了 main 分支)的本地分支,过滤掉当前分支(*)和 main、develop 节点,避免删除它们,一次安全地删除剩余的每个分支
cloc: @ciaclean:
cd {{invocation_directory()}} && git ls-files | xargs cloc git branch --merged origin/main | grep -vE "^\s*(\*|main|develop)" | xargs -n 1 git branch -d
# 统计代码量(支持文件名包含空格)
cloc range="":
cd {{root}} && python lib/generated/time_taken_sum.py && echo "\n"
cd {{invocation_directory()}} && git ls-files -z \
{{ if range != "all" { "| grep -z -v '^test/'" } else { "" } }} \
| xargs -0 cloc
# === just 管理命令 === # === just 管理命令 ===