Skip to content

Commit

Permalink
Don't update dapps without logo
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 committed Oct 30, 2023
1 parent 743ed5b commit 6819ca5
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 6819ca5

Please sign in to comment.