Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build bot currently not building updated icons #656

Closed
Thomas-Boi opened this issue May 28, 2021 · 1 comment
Closed

Build bot currently not building updated icons #656

Thomas-Boi opened this issue May 28, 2021 · 1 comment
Labels
discussion Use this label for community discussions about changes/features/.. enhancement help wanted Use this label if you require some help on a specific topic

Comments

@Thomas-Boi
Copy link
Member

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?

@Thomas-Boi Thomas-Boi added enhancement help wanted Use this label if you require some help on a specific topic discussion Use this label for community discussions about changes/features/.. labels May 28, 2021
@Thomas-Boi
Copy link
Member Author

I'm leaning towards option 4. I think it's not as time intensive as option 2 and doesn't requires extra work like option 3. We already have some of the code to do so as well. Furthermore, the majority of icon PRs are properly tagged and named => works to our advantage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Use this label for community discussions about changes/features/.. enhancement help wanted Use this label if you require some help on a specific topic
Projects
None yet
Development

No branches or pull requests

1 participant