From 7c7fa70ddb99554b562ed297b62b1dea8c316e78 Mon Sep 17 00:00:00 2001 From: Nolen Johnson Date: Tue, 12 Jul 2022 11:41:16 -0400 Subject: [PATCH] scripts: pixel: Make `build-desc-fingerprint.sh` commit changes Tests: cd lineage/scripts/pixel && ./build-desc-fingerprint.sh coral flame Notes: No additional issues added in `shellcheck` Change-Id: I1810ad996d727337b73c6959aaa37bdcaf0d5e5b --- pixel/build-desc-fingerprint.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pixel/build-desc-fingerprint.sh b/pixel/build-desc-fingerprint.sh index da791fa..7eaed96 100755 --- a/pixel/build-desc-fingerprint.sh +++ b/pixel/build-desc-fingerprint.sh @@ -58,6 +58,7 @@ main() { local ds="${devices[@]}" fi + # Update the makefiles for d in ${ds}; do ( local dv="${vars_path}/${d}" @@ -67,6 +68,18 @@ main() { sed -i "s/${prev_build_number}/${build_number}/g" "${mk}" ) done + + # Commit the changes + for d in ${ds}; do + ( + local dv="${vars_path}/${d}" + source "${dv}" + cd "${top}/device/google/${d}" + if [[ -n "$(git status --porcelain)" ]]; then + git commit -a -m "Update fingerprint/build description from ${build_id}" + fi + ) + done } ### RUN PROGRAM ###