Files
packages/andax/ci/update_commit_message.rhai
T
Gilver 2650daedcf feat(ci): better autoupdate commit messages (#4720) (#4738)
* feat(ci): better autoupdate commit messages

* fix: also sort

(cherry picked from commit 7de992923b)

Signed-off-by: RockGrub <RockGrub@users.noreply.github.com>
Co-authored-by: madomado <madonuko@outlook.com>
2025-05-07 21:03:44 +08:00

14 lines
463 B
Plaintext

import "anda::cfg" as cfg;
let cmd = `git status | sed -nE '/^\tmodified:/{s@^\tmodified:\s+@@;s@[^/]+$@@;p}' | sort -u`;
let filelist = sh(cmd, #{ "stdout": "piped" }).ctx.stdout.split('\n');
let modified_list = "";
for file in filelist {
if file.is_empty() { continue; }
let spec = cfg::load_file(`${file}/anda.hcl`).project.pkg.rpm.spec;
spec.pop(5); // remove `.spec` suffix
modified_list += `${spec} `;
}
print(modified_list[..modified_list.len()-1]);