mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 06:50:29 +03:00
Rename commitupdates to fd-commit
This commit is contained in:
parent
93b09413a4
commit
e4165eafb2
1 changed files with 0 additions and 0 deletions
|
|
@ -1,45 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Commits updates to apps, allowing you to edit the commit messages
|
||||
|
||||
commands=()
|
||||
|
||||
while read line; do
|
||||
if [[ "$line" == *M*metadata/*.txt ]]; then
|
||||
file=${line##* }
|
||||
|
||||
while read l; do
|
||||
[[ "$l" == "Auto Name:"* ]] && name=${l##*:}
|
||||
done < "$file"
|
||||
|
||||
id=${file##*/}
|
||||
id=${id%.txt*}
|
||||
[ -d metadata/$id ] && extra=metadata/$id
|
||||
[ -n "$name" ] && id="$name ($id)"
|
||||
|
||||
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)
|
||||
|
||||
for cmd in "${commands[@]}"; do
|
||||
eval "$cmd"
|
||||
done
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue