Skip to content

Build bot currently not building updated icons #656

@Thomas-Boi

Description

@Thomas-Boi

Problem
Adding a new SVG to a folder that has been built will not make the new SVG to be built. This also applies to updating an SVG within a built folder

Current Situation
The build bot only searches whether an icon folder has been added to the icomoon.json. If it has, that entire folder and its content, will not be built. This was done so searching through the icomoon.json is faster than searching every icon.

In the screenshot below, I'm looping through the icomoon.json and if I found a name (ex. apple), I'm finished.
image

Possible Fixes
I can think of four ways of doing this:

  1. Manually update the fonts files and css files whenever this happens.
  • Pro: This is the quickest in the short term
  • Cons: Will be tedious in the long run. Not recommended.
  1. Make the build bot rebuilds the entire repo every time it's run.
  • Pro: This will ensure updated and added files are rebuilt properly as long as the devicon.json is up to date
  • Cons: Might take a long time to finish building. Time will get worse in the future.
  1. Add an extra property to the devicon.json that tells the bot whether a folder has been updated. The bot, when building, will also checks for this property and add the "updated" icon to the build list.
  • Pro: Fix the issue and run faster than option 2.
  • Cons: Extra property in the devicon.json. However, this property is optional and only need to be added when an icon needs to be re-built.

Example how option 3 will work. We need to update the codecov folder. Maybe old icons got updated. Maybe we add more versions to the folder. We will add the updated property to the codecov object in devicon.json.

    {
        "name": "codecov",
        ...,
        "updated": true
    },

The bot will parse the file and add them to the build list. Afterwards, it will rewrite the devicon.json and remove that attribute.

  1. Rather than comparing the devicon.json and icomoon.json, the bot will check the PR history since last build and extract the icon name from the PR titles.
  • Pro: This is already being done in get_release_message bot. Since all icon PR are tagged with feature:icon, finding icon PR would be easy. Extracting the icon name is easy as well since peek-bot already does this.
  • Cons: Require all icon PR to be in the same format and be tagged with feature:icon.

What do you guys think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionCommunity discussions about changes/features/..enhancementhelp wantedUse this label if you require some help on a specific topic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions