-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
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.
Possible Fixes
I can think of four ways of doing this:
- 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.
- 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.
- 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.
- Rather than comparing the
devicon.json
andicomoon.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 withfeature:icon
, finding icon PR would be easy. Extracting the icon name is easy as well sincepeek-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?