Skip to content

Commit

Permalink
Change patch publishing dates to also patch entry.json sha256 for mod…
Browse files Browse the repository at this point in the history
…ified index-v2.json, needs fdroid signindex to work
  • Loading branch information
wmontwe committed Feb 8, 2024
1 parent 72a97a3 commit 18a5947
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/fdroid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ jobs:

- name: Patch publishing dates
run: ./patch_publishing_dates.sh

- name: Sign repository
run: fdroid signindex
working-directory: ./fdroid

- name: Setup Pages
uses: actions/configure-pages@v4
Expand Down
2 changes: 1 addition & 1 deletion download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,5 @@ rm -rf tmp
mkdir -p tmp

load_app_versions thunderbird/thunderbird-android com.fsck.k9 true
load_apps thunderbird/thunderbird-android com.fsck.k9 4
load_apps thunderbird/thunderbird-android com.fsck.k9 20
update_metadata thunderbird/thunderbird-android app-k9mail com.fsck.k9
17 changes: 17 additions & 0 deletions patch_publishing_dates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,21 @@ patch_publishing_dates () {
done
}

# Patch entry.json with new sha256
# Requires fdroid signindex to be run after this
patch_entry_json () {
local entryJson="fdroid/repo/entry.json"
local indexV2Json="fdroid/repo/index-v2.json"
local tmpEntryJson="tmp/entry.json"

local sha256=$(cat "$indexV2Json" | openssl dgst -sha256 | awk '{print $2}')

jq '.index.sha256 = "'"$sha256"'"' \
"$entryJson" \
> "$tmpEntryJson"
mv $tmpEntryJson $entryJson
}

patch_publishing_dates com.fsck.k9

patch_entry_json

0 comments on commit 18a5947

Please sign in to comment.