Skip to content

Commit

Permalink
Don't update dapps without logo (#1991)
Browse files Browse the repository at this point in the history
This updates the dapps update script to skip dapps that do not have a
logo. If the dapp doesn't have a logo, then we don't have much to
display.

This also adds some comments to the jq filter used to parse the dapps
list for clarity.
  • Loading branch information
nmattia authored Oct 30, 2023
1 parent bf4ff08 commit 2757b03
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions scripts/update-dapps
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,11 @@ function update() {
| jq \
--arg portal_logo_prefix "$portal_logo_prefix" \
'[ .[]
| select(.usesInternetIdentity == true)
| select(.name != "Internet Identity")
| .logo |= sub("^/" + $portal_logo_prefix + "/"; "")
| with_entries(
| select(.usesInternetIdentity == true) # ensure the dapp actually uses II
| select(.name != "Internet Identity") # skip II itself
| select(.logo != null) # only use dapps with logo
| .logo |= sub("^/" + $portal_logo_prefix + "/"; "") # swap the logo for our prefix
| with_entries( # drop entries we do not care about to reduce size
select(
[.key]
| inside(["name", "website", "oneLiner", "logo", "authOrigins"])
Expand Down

0 comments on commit 2757b03

Please sign in to comment.