get changed files from git status

This commit is contained in:
David Holdeman 2024-03-03 22:13:39 -06:00 committed by rusefillc
parent 9fb24eeb9a
commit f2b48dde2d
1 changed files with 4 additions and 12 deletions

View File

@ -78,27 +78,19 @@ jobs:
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
shopt -s globstar
git config --local user.email "action@github.com"
git config --local user.name "GitHub gen-default-tune Action"
echo See https://github.com/rusefi/rusefi/issues/2446
echo "Status 1/3"
git status
# not out place to update live data etc
git restore */*.java
git restore */*.ini
git restore */*.h
# not our place to update live data etc
FILES=$(git status --porcelain | grep -e "\.java" -e "\.ini" -e "\.h"| cut -d' ' -f3)
[ -n "$FILES" ] && git restore $FILES
echo "Status 2/3"
git status
git restore **/*.java
git restore **/*.ini
git restore **/*.h
echo "Status 3/3"
git status
git pull https://github.com/rusefi/rusefi master
git add 'simulator/generated/*xml'
# get the original ramdisk images back in order to not overwrite the default placeholder
git checkout -- firmware/hw_layer/mass_storage/ramdisk_image.h firmware/hw_layer/mass_storage/ramdisk_image_compressed.h
echo "Status 3/3"
git status
OUT=$(git commit -am "Auto-generated default tune" 2>&1) || echo "commit failed, finding out why"
if echo "$OUT" | grep 'nothing to commit'; then