-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add release download of beta versions
- Loading branch information
Showing
2 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
|
||
if ! command -v gh $> /dev/null | ||
then | ||
echo "gh could not be found, please install GitHub CLI" | ||
exit 1 | ||
fi | ||
|
||
load_app_versions () { | ||
gh release list -R $1 --limit 200 --json=tagName,isPrerelease --jq ".[] | select(.isPrerelease == $2) | .tagName" --exclude-drafts > $3 | ||
} | ||
|
||
load_apps () { | ||
counter=1 | ||
while [ $counter -le $2 ] | ||
do | ||
version=$(sed "${counter}q;d" $3) | ||
file=fdroid/repo/${4}-${version}.apk | ||
echo $version | ||
echo $file | ||
gh release download -R $1 $version -O $file | ||
((counter++)) | ||
done | ||
} | ||
|
||
update_metadata () { | ||
gh repo clone $1 tmp/$1 | ||
rm -r fdroid/metadata/$3 | ||
cp -r tmp/$1/$2/fastlane/metadata/android/ fdroid/metadata/$3 | ||
} | ||
|
||
mkdir -p tmp | ||
|
||
load_app_versions thunderbird/thunderbird-android true tmp/k9-beta-versions.txt | ||
|
||
load_apps thunderbird/thunderbird-android 10 tmp/k9-beta-versions.txt k9-beta | ||
|
||
update_metadata thunderbird/thunderbird-android app-k9mail com.fsck.k9 |