change metadata
Some checks failed
Android Release / release (push) Failing after 5m20s

This commit is contained in:
2026-01-19 01:30:38 +03:00
parent 62a92a65f1
commit 3be25d8161

View File

@@ -102,23 +102,38 @@ jobs:
APPID=$(grep 'applicationId' app/build.gradle | awk -F '"' '{print $2}')
VERSION_CODE=$(echo $VERSION | awk -F. '{ printf("%d%02d%02d", $1,$2,$3 ? $3 : 0); }')
LICENSE="MIT"
AUTHOR="Alex Denisov"
ICON="repo/icons/app_icon.png"
mkdir -p fdroid-repo/metadata
for apk in fdroid-repo/repo/*.apk; do
FILENAME=$(basename "$apk")
VERSION=$(echo "$FILENAME" | sed -E 's/.*_(.*)\.apk$/\1/')
VERSION_CODE=$(echo $VERSION | awk -F. '{ printf("%d%02d%02d", $1,$2,$3 ? $3 : 0); }')
SHA256=$(sha256sum "$apk" | awk '{print $1}')
SOURCECODE="https://git.daemonlord.ru/${{ gitea.repository }}"
printf '%s\n' \
"Id: $APPID" \
"License: $LICENSE" \
"SourceCode: $SOURCECODE" \
"Icon: icons/app_icon.png" \
"Apk:" \
" - versionCode: $VERSION_CODE" \
" versionName: \"$VERSION\"" \
" path: \"$FILENAME\"" \
" originalFileName: \"$FILENAME\"" \
"AuthorName: $AUTHOR" \
"Categories:" \
" - Internet" \
"SourceCode: https://github.com/example/$APPID" \
"Icon: $ICON" \
"" \
"Builds:" \
" - versionName: $VERSION" \
" versionCode: $VERSION_CODE" \
" path: $FILENAME" \
" originalFileName: $FILENAME" \
" hashes:" \
" sha256: \"$SHA256\"" \
" sha256: $SHA256" \
"" \
"CurrentVersion: $VERSION" \
"CurrentVersionCode: $VERSION_CODE" \
"AutoUpdateMode: Version %v" \
"UpdateCheckMode: Tags" \
> "fdroid-repo/metadata/$APPID.yml"
done