1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-07 07:50:11 +01:00

commitupdates now treats all other changes in a generic manner

This commit is contained in:
Daniel Martí 2013-10-30 20:17:56 +01:00
parent efb161e622
commit 355dabc43e

View File

@ -8,25 +8,6 @@ while read line; do
if [[ "$line" == *M*metadata/*.txt ]]; then
file=${line##* }
newbuild=0
while read l; do
if [[ "$l" == "+Build Version:"* ]]; then
newbuild=1
build=${l#*:}
version=${build%%,*}
build=${build#*,}
vercode=${build%%,*}
elif [[ "$l" == "+Build:"* ]]; then
newbuild=1
build=${l#*:}
version=${build%%,*}
build=${build#*,}
vercode=${build%%,*}
fi
done < <(git diff HEAD -- "$file")
[ $newbuild -eq 0 ] && continue
while read l; do
[[ "$l" == "Auto Name:"* ]] && name=${l##*:}
done < "$file"
@ -36,7 +17,25 @@ while read line; do
[ -d metadata/$id ] && extra=metadata/$id
[ -n "$name" ] && id="$name ($id)"
commands+=("git commit -m 'Update $id to $version ($vercode)' -e -v -- $file $extra")
newbuild=0
while read l; do
if [[ "$l" == "+Build:"* ]]; then
newbuild=1
build=${l#*:}
version=${build%%,*}
build=${build#*,}
vercode=${build%%,*}
fi
done < <(git diff HEAD -- "$file")
if [ $newbuild -eq 0 ]
then
message="$id:"
else
message="Update $id to $version ($vercode)"
fi
commands+=("git commit -m '$message' -e -v -- $file $extra")
fi
done < <(git status --porcelain)