Skip to content

Commit c7d326b

Browse files
authored
Merge pull request #560 from devicons/develop
Release v2.11.0
2 parents 2809b56 + a23a1cd commit c7d326b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+1048
-78
lines changed

.github/scripts/icomoon_peek.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def main():
2424
if len(filtered_icons) == 0:
2525
message = "No icons found matching the icon name in the PR's title.\n" \
2626
"Ensure that a new icon entry is added in the devicon.json and the PR title matches the convention here: \n" \
27-
"https://github.com/devicons/devicon/blob/master/CONTRIBUTING.md#overview.\n" \
27+
"https://github.com/devicons/devicon/blob/master/CONTRIBUTING.md#overview\n" \
2828
"Ending script...\n"
2929
sys.exit(message)
3030

.github/workflows/build_icons.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
5252
I'm Devicon's Build Bot and I just built some new font files and devicon.min.css file.
5353
54-
Here are all the files that were built into icons:
54+
Here are all the files that were built into icons (the new ones are those without highlight):
5555
5656
![Files Built]({0})
5757
@@ -65,8 +65,7 @@ jobs:
6565
Adios,
6666
Build Bot :sunglasses:
6767
with:
68-
branch: 'master-build-result'
69-
base: 'master'
68+
branch: 'bot/build-result'
7069
commit-message: 'Built new icons, icomoon.json and devicon.css'
7170
title: 'bot:build new icons, icomoon.json and devicon.css'
7271
body: ${{ format(env.MESSAGE, fromJSON(steps.imgur_step.outputs.imgur_urls)[0] ) }}

.github/workflows/peek_icons.yml

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ on:
33
pull_request:
44
types: [labeled]
55
jobs:
6-
build:
6+
peek:
7+
# four outcomes: successful check and upload,
8+
# unsuccessful check (fail due to user),
9+
# fail due to system, skipped
710
name: Peek Icons
811
if: github.event.label.name == 'bot:peek'
912
runs-on: windows-2019
@@ -20,6 +23,18 @@ jobs:
2023
python -m pip install --upgrade pip
2124
pip install -r ./.github/scripts/requirements.txt
2225
26+
- name: Save the PR number in an artifact
27+
shell: bash
28+
env:
29+
PR_NUM: ${{ github.event.number }}
30+
run: echo $PR_NUM > pr_num.txt
31+
32+
- name: Upload the PR number
33+
uses: actions/upload-artifact@v2
34+
with:
35+
name: pr_num
36+
path: ./pr_num.txt
37+
2338
- name: Run icomoon_peek.py
2439
env:
2540
PR_TITLE: ${{ github.event.pull_request.title }}
@@ -36,21 +51,9 @@ jobs:
3651
name: screenshots
3752
path: ./screenshots/*.png
3853

39-
- name: Save the pr num in an artifact
40-
shell: bash
41-
env:
42-
PR_NUM: ${{ github.event.number }}
43-
run: echo $PR_NUM > pr_num.txt
44-
45-
- name: Upload the pr num
46-
uses: actions/upload-artifact@v2
47-
with:
48-
name: pr_num
49-
path: ./pr_num.txt
50-
5154
- name: Upload geckodriver.log for debugging purposes
5255
uses: actions/upload-artifact@v2
5356
if: failure()
5457
with:
5558
name: geckodriver-log
56-
path: ./geckodriver.log
59+
path: ./geckodriver.log

.github/workflows/post_check_svgs_comment.yml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,21 @@ jobs:
3535
with:
3636
path: ./svg_err_messages/svg_err_messages.txt
3737

38-
- name: Comment on the PR about the result - Success
39-
uses: jungwinter/comment@v1 # let us comment on a specific PR
40-
if: success() && steps.err_message_reader.outputs.content == '1'
41-
env:
42-
MESSAGE: |
43-
Hi!
44-
I'm Devicons' SVG-Checker Bot and everything looks great. Good job!
38+
# - name: Comment on the PR about the result - Success
39+
# uses: jungwinter/comment@v1 # let us comment on a specific PR
40+
# if: success() && steps.err_message_reader.outputs.content == '1'
41+
# env:
42+
# MESSAGE: |
43+
# Hi!
44+
# I'm Devicons' SVG-Checker Bot and everything looks great. Good job!
4545

46-
Have a nice day,
47-
SVG-Checker Bot :grin:
48-
with:
49-
type: create
50-
issue_number: ${{ steps.pr_num_reader.outputs.content }}
51-
token: ${{ secrets.GITHUB_TOKEN }}
52-
body: ${{ env.MESSAGE }}
46+
# Have a nice day,
47+
# SVG-Checker Bot :grin:
48+
# with:
49+
# type: create
50+
# issue_number: ${{ steps.pr_num_reader.outputs.content }}
51+
# token: ${{ secrets.GITHUB_TOKEN }}
52+
# body: ${{ env.MESSAGE }}
5353

5454
- name: Comment on the PR about the result - SVG Error
5555
uses: jungwinter/comment@v1 # let us comment on a specific PR
@@ -79,6 +79,11 @@ jobs:
7979
token: ${{ secrets.GITHUB_TOKEN }}
8080
body: ${{ format(env.MESSAGE, steps.err_message_reader.outputs.content) }}
8181

82+
# if we posted error messages before, we fail this entire workflow
83+
- name: Fail workflow is there is an error.
84+
uses: cutenode/action-always-fail@v1.0.1
85+
if: success() && (steps.err_message_reader.outputs.content != '0' && steps.err_message_reader.outputs.content != '1')
86+
8287
- name: Comment on the PR about the result - Failure
8388
uses: jungwinter/comment@v1 # let us comment on a specific PR
8489
if: failure()

.github/workflows/post_peek_screenshot.yml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,16 @@ jobs:
88
post_screenshots_in_comment:
99
name: Post the screenshot
1010
runs-on: ubuntu-18.04
11+
if: github.event.action == 'completed' && github.event.workflow_run.conclusion != 'skipped'
12+
env:
13+
# three possible values: 'skipped', 'success', 'failure'
14+
# have to print github.event to console to see these values
15+
# note: can't use this env variable up in the if statement above for some reason.
16+
# I don't think it's an ordering issue cause it seems 'if' is auto evaluate first
17+
PEEK_STATUS: ${{ github.event.workflow_run.conclusion }}
1118
steps:
12-
- name: Check if the trigger run worked. If not, fail the current run.
13-
if: github.event.workflow_run.conclusion != 'success'
14-
uses: cutenode/action-always-fail@v1.0.1
19+
- name: Check state of last run
20+
run: echo $PEEK_STATUS
1521

1622
- name: Download workflow artifact
1723
uses: dawidd6/action-download-artifact@v2.11.0
@@ -21,14 +27,14 @@ jobs:
2127
run_id: ${{ github.event.workflow_run.id }}
2228

2329
- name: Read the pr_num file
24-
if: success()
2530
id: pr_num_reader
2631
uses: juliangruber/read-file-action@v1.0.0
2732
with:
2833
path: ./pr_num/pr_num.txt
2934

3035
- name: Upload screenshot of the newly made icons gotten from the artifacts
3136
id: icons_overview_img_step
37+
if: env.PEEK_STATUS == 'success' && success()
3238
uses: devicons/public-upload-to-imgur@v2.2.1
3339
with:
3440
path: ./screenshots/new_icons.png
@@ -37,22 +43,20 @@ jobs:
3743
- name: Upload zoomed in screenshot of the newly made icons gotten from the artifacts
3844
id: icons_detailed_img_step
3945
uses: devicons/public-upload-to-imgur@v2.2.1
40-
if: success()
46+
if: env.PEEK_STATUS == 'success' && success()
4147
with:
4248
path: ./screenshots/screenshot_*.png
4349
client_id: ${{secrets.IMGUR_CLIENT_ID}}
4450

4551
- name: Comment on the PR about the result - Success
4652
uses: jungwinter/comment@v1 # let us comment on a specific PR
47-
if: success()
53+
if: env.PEEK_STATUS == 'success' && success()
4854
env:
49-
OVERVIEW_IMG_MARKDOWN: ${{ fromJSON(steps.icons_overview_img_step.outputs.markdown_urls)[0] }}
50-
DETAILED_IMGS_MARKDOWN: ${{ join(fromJSON(steps.icons_detailed_img_step.outputs.markdown_urls), '') }}
5155
MESSAGE: |
5256
Hi there,
5357
5458
I'm Devicons' Peek Bot and I just peeked at the icons that you wanted to add using [icomoon.io](https://icomoon.io/app/#/select).
55-
Here is the result below:
59+
Here is the result below (top right):
5660
5761
{0}
5862
@@ -71,10 +75,13 @@ jobs:
7175
type: create
7276
issue_number: ${{ steps.pr_num_reader.outputs.content }}
7377
token: ${{ secrets.GITHUB_TOKEN }}
74-
body: ${{format(env.MESSAGE, env.OVERVIEW_IMG_MARKDOWN, env.DETAILED_IMGS_MARKDOWN)}}
78+
body: >
79+
${{ format(env.MESSAGE,
80+
fromJSON(steps.icons_overview_img_step.outputs.markdown_urls)[0],
81+
join(fromJSON(steps.icons_detailed_img_step.outputs.markdown_urls), '')) }}
7582
7683
- name: Comment on the PR about the result - Failure
77-
if: failure() || cancelled()
84+
if: failure() || env.PEEK_STATUS == 'failure'
7885
uses: jungwinter/comment@v1 # let us comment on a specific PR
7986
env:
8087
MESSAGE: |
@@ -88,7 +95,7 @@ jobs:
8895
- Your icon information has been added to the `devicon.json` as seen [here](https://github.com/devicons/devicon/blob/master/CONTRIBUTING.md#updateDevicon)
8996
- Your PR title follows the format seen [here](https://github.com/devicons/devicon/blob/master/CONTRIBUTING.md#overview)
9097
91-
Once everything is fixed, I will try. If I still fail (sorry!), the maintainers will investigate further.
98+
I will retry once everything is fixed. If I still fail (sorry!) or there are other erros, the maintainers will investigate.
9299
93100
Best of luck,
94101
Peek Bot :relaxed:

.github/workflows/stale.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: 'Stale'
2+
on:
3+
schedule:
4+
- cron: '30 1 * * *'
5+
6+
jobs:
7+
stale:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/stale@main
11+
with:
12+
repo-token: ${{ secrets.GITHUB_TOKEN }}
13+
stale-pr-message: 'Hello there,
14+
we noticed that this PR has been inactive for a while now. If there are any changes which are suitable for our repository,
15+
we would love to have it. It would be great if you can continue with this PR, but if you cannot, we might fork your changes and merge the changes ourselves.
16+
17+
Since GitHub tracks contributions by commits, you will still be credited.
18+
19+
Let us know what you think 😃'
20+
stale-pr-label: 'stale'
21+
days-before-pr-stale: 30
22+
days-before-pr-close: -1

CONTRIBUTING.md

Lines changed: 51 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<h1>Contributing to Devicon</h1>
22
<p>
3-
First of all, thanks for taking the time to contribute! This project can only grow and live by your countless contributions. To keep this project maintable we developed some guidelines for contributions.
3+
First of all, thanks for taking the time to contribute! This project can only grow and live by your countless contributions. To keep this project maintainable, we have developed some guidelines for our contributors.
44
</p>
55

66
<h2>Table of Content</h2>
@@ -15,20 +15,23 @@ First of all, thanks for taking the time to contribute! This project can only gr
1515
<li><a href="#requestingIcon">Requesting An Icon</a></li>
1616
<li><a href="#teams">Maintainer/Reviewer/Teams</a></li>
1717
<li><a href="#buildScript">Regarding the Build Script</a></li>
18+
<li><a href="#discordServer">Discord server</a></li>
19+
<li><a href="#release">Release strategy, conventions, preparation and execution</a></li>
1820
</ul>
1921

2022
<hr>
2123
<h2 id="terms">Terms</h2>
2224
<p>Here are some terms that we will use in this repo: </p>
2325
<ol>
24-
<li>"Icon" refers to the set of svgs/icons of a technology/tool. Ex: We might refer to the React svgs and React icons as the React Icon</li>
25-
<li>"SVG/<code>.svg</code>" refers to the <code>svg</code> versions of the Icons.</li>
26-
<li>"icons" (lowercase) refers to the font icon versions of the Icons.</li>
26+
<li>"Technology" is used to describe a software, libraries, tool, etc...</li>
27+
<li>"Icon" refers to the svgs and icons version of a technology as a whole.</li>
28+
<li>"SVG/<code>svg</code>" refers to the <code>svg</code> versions of the Icons.</li>
29+
<li>"icon" (lowercase) refers specficially to the font icon versions of the Icons.</li>
2730
</ol>
2831

2932
<hr>
3033
<h2 id="overview">Overview on Submitting Icons</h2>
31-
<p>Here is an overview of what you have to do to submit your icons to the repo.</p>
34+
<p>Here is what you have to do to submit your icons to the repo.</p>
3235
<ol>
3336
<li>Create the svgs for each <a href="#versionNaming"> svg versions </a> that you have</li>
3437
<li>Put the svgs of each Icon into its own folders in <code>/icons</code> </li>
@@ -43,6 +46,13 @@ First of all, thanks for taking the time to contribute! This project can only gr
4346

4447
<hr>
4548
<h2 id='versionNaming'>Versions and Naming Conventions</h2>
49+
<p>For the technology name, make the file and folder name lowercase and concatenate them. For example:</p>
50+
<ul>
51+
<li>AngularJS becomes <code>angularjs</code> or just <code>angular</code></li>
52+
<li>Amazon Web Services becomes <code>amazonwebservices</code></li>
53+
<li>Microsoft SQL Server becomes <code>microsoftsqlserver</code></li>
54+
</ul>
55+
4656
<p>Each icon/svg can come in different versions. So far, we have:</p>
4757
<ul>
4858
<li><b>original</b>: the original logo. Can contain multiple colors. <a href="https://github.com/devicons/devicon/blob/master/icons/amazonwebservices/amazonwebservices-original.svg"> Example </a> </li>
@@ -65,7 +75,6 @@ First of all, thanks for taking the time to contribute! This project can only gr
6575
</li>
6676
<li>
6777
Some icons are really simple (ex. Apple), so the original version can be used as the plain version and as the icon font. In this case, you'll only need to make one of the version (either "original" or "plain"). You can then add an alias in the <code>devicon.json</code> so they can be found with either the "original" or "plain" naming convention. Note: this only applies to font icon versions only, not the SVG versions.
68-
6978
</li>
7079
</ul>
7180

@@ -74,15 +83,15 @@ First of all, thanks for taking the time to contribute! This project can only gr
7483
<p>Before you submit your logos/svgs, please ensure that they meet the following standard:</p>
7584
<ul>
7685
<li>The background must be transparent.</li>
77-
<li>The svg name follows this convention: <code>(Icon name)-(original|plain|line)(-wordmark?).</code></li>
86+
<li>The svg name follows this convention: <code>(Technology name)-(original|plain|line)(-wordmark?).</code></li>
7887
<li>The <b>plain</b> and <b>line</b> versions (with or without wordmark) need to stay as simple as possible. They must have only one color and the paths are united. We will strip the color when turning it into icons so they can have any color.
7988
</li>
8089
<li>Optimize/compress your SVGs. You can use a service like <a href="https://compressor.io/">compressor</a> or <a href="https://petercollingridge.appspot.com/svg-editor">SVG Editor</a>.</li>
8190
<li>The icon's strokes and texts must be fills. This is to satisfy our conversion website's <a href="https://icomoon.io/#docs/stroke-to-fill">requirements.</a></li>
8291
<li>Each <code>.svg</code> file contains one version of an icon in a <code>0 0 128 128</code> viewbox. You can use a service like <a href="https://www.iloveimg.com/resize-image/resize-svg">resize-image</a> for scaling the svg.</li>
8392
<li>The <code>svg</code> element does not need the <code>height</code> and <code>width</code> attributes. However, if you do use it, ensure their values are either <code>"128"</code> or <code>"128px"</code>. Ex: <code>height="128"</code></li>
8493
<li>Each <code>.svg</code> must use the <code>fill</code> attribute instead of using <code>classes</code> for colors. See <a href="https://github.com/devicons/devicon/issues/407">here</a> for more details.</li>
85-
<li>The naming convention for the svg file is the following: <code>(Icon name)-(original|plain|line)(-wordmark?).</code></li>
94+
<li>The naming convention for the svg file is the following: <code>(Technology name)-(original|plain|line)(-wordmark?).</code></li>
8695
</ul>
8796

8897
<hr>
@@ -299,3 +308,37 @@ As an example, let's assume you have created the svgs for Redhat and Amazon Web
299308
<li>Comment on the PR so maintainers don't have to manually upload icon result.</li>
300309
<li>Publishing a new release to <a href="https://www.npmjs.com/package/devicon">npm</a>; See <a href="https://github.com/devicons/devicon/issues/288">#288</a></li>
301310
</ul>
311+
312+
<h2 id="discordServer">Discord server</h2>
313+
<p>
314+
We are running a Discord server. You can go here to talk, discuss, and more with the maintainers and other people, too. Here's the invitation: https://discord.gg/hScy8KWACQ. If you don't have a GitHub account but want to suggest ideas or new icons, you can do that here in our Discord channel.
315+
<b>Note that the Discord server is unofficial, and Devicons is still being maintained via GitHub.</b>
316+
</p>
317+
318+
<h2 id='release'>Release strategy, conventions, preparation and execution</h2>
319+
<h5>Release strategy</h5>
320+
<p>Devicon does not follow a strict release plan. A new release is depended on current amount of contributions, required bugfixes/patches and will be discussed by the team of maintainers.</p>
321+
<p>Generally speaking: A new release will be published when new icons are added or a bug was fixed. When it's predictable that multiple icons are added in a foreseeable amount of time they are usually wrapped together.</p>
322+
<h5>Conventions</h5>
323+
<p>The version naming follows the rules of <a href="https://semver.org/">Semantic Versioning</a>. Given a version number MAJOR.MINOR.PATCH, increment the:</p>
324+
<ul>
325+
<li>MAJOR version when you make incompatible API changes,</li>
326+
<li>MINOR version when you add functionality <b>(like a new icon)</b> in a backwards compatible manner, and</li>
327+
<li>PATCH version when you make backwards compatible bug fixes.</li>
328+
</ul>
329+
330+
<h5>Release preparation and execution</h5>
331+
<ol>
332+
<li>Define the next release version number based on the conventions</li>
333+
<li>Checkout <code>development</code> as <code>draft-release</code> branch</li>
334+
<li>Bump the package version using <code>npm version v<i>MAJOR</i>.<i>MINOR</i>.<i>PATCH</i> -m "bump npm version to v<i>MAJOR</i>.<i>MINOR</i>.<i>PATCH</i>"</code> (see <code><a href="https://github.com/devicons/devicon/pull/497">#487</a></code>)</li>
335+
<li>Push the branch <code>draft-release</code></li>
336+
<li>Manually trigger the workflow <code><a href="https://github.com/devicons/devicon/actions/workflows/build_icons.yml">build_icons.yml</a></code> (which has a <code>workflow_dispatch</code> event trigger) and select the branch <code>draft-release</code> as target branch. This will build a font version of all icons using icomoon and automatically creates a pull request to merge the build result back into <code>draft-release</code></li>
337+
<li>Review and approve the auto-create pull request created by the action of the step above</li>
338+
<li>Create a pull request towards <code>development</code>. Mention the release number in the pull request title and add information about all new icons, fixes, features and enhancements in the description of the pull request. Take the commits as a guideline. It's also a good idea to mention and thank all contributions who participated in the release (take description of <code><a href="https://github.com/devicons/devicon/pull/504">#504</a></code> as an example).</li>
339+
<li>Wait for review and approval of the pull request (<b>DON'T</b> perform a squash-merge)</li>
340+
<li>Once merged create a pull request with BASE <code>master</code> and HEAD <code>development</code>. Copy the description of the earlier pull request.</li>
341+
<li>Since it was already approved in the 'development' stage a maintainer is allowed to merge it (<b>DON'T</b> perform a squash-merge).</li>
342+
<li>Create a <a href="https://github.com/devicons/devicon/releases/new">new release</a> using v<i>MAJOR</i>.<i>MINOR</i>.<i>PATCH</i> as tag and release title. Use the earlier created description as description of the release.</li>
343+
<li>Publishing the release will trigger the <a href="/.github/workflows/npm_publish.yml">npm_publish.yml</a> workflow which will execute a <code>npm publish</code> leading to a updated <a href="https://www.npmjs.com/package/devicon">npm package</a> (v<i>MAJOR</i>.<i>MINOR</i>.<i>PATCH</i>).</li>
344+
</ol>

0 commit comments

Comments
 (0)