Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
1ef6207
Added a script to upgrade the devicon.json
Thomas-Boi Sep 7, 2020
f96b3c8
Create basic functions to create aliases and colors css
Thomas-Boi Sep 11, 2020
cc441b3
Added a gulp task to trigger the updateCss task
Thomas-Boi Sep 14, 2020
3196fce
Added colors for clojure, clojurescript, redux, yunohost, and dot-net
Thomas-Boi Sep 14, 2020
276f7ae
Sass now compress output and fix a bug with joining array
Thomas-Boi Sep 14, 2020
a059bad
Added a cleanUp() and an npm task to run the gulp task
Thomas-Boi Sep 14, 2020
f498c46
Added extra artifact generation and logging function
Thomas-Boi Sep 14, 2020
ca1667d
Build new icons, icomoon.json and devicon.css
Thomas-Boi Sep 14, 2020
3770e80
Merge remote-tracking branch 'origin/master' into upgrade-devicon
amacado Sep 22, 2020
47f9ca6
Build new icons, icomoon.json and devicon.css
amacado Sep 22, 2020
8c54685
Added color classes to flutter icons and its variations to json file
ezSaldana Sep 23, 2020
e30da62
Added flutter icons in plain and original with their respective eps file
ezSaldana Sep 23, 2020
1669a82
Added kotlin icons in plain, original and its wordmarks. Added eps fi…
ezSaldana Sep 23, 2020
5499688
Added colored style to kotlin icons and its variations in the json file
ezSaldana Sep 23, 2020
1973e3f
Removed artifacts and unneeded files to test the build script
Thomas-Boi Sep 30, 2020
3bc1d9a
Merge pull request #290 from devicons/upgrade-devicon
Thomas-Boi Sep 30, 2020
32065ae
Changed build_icons.yml to trigger on label added and create new pr
Thomas-Boi Sep 30, 2020
ae7caa2
Changed the pr action, trigger and added proper if check
Thomas-Boi Oct 7, 2020
1059057
Changed built branch name to build/{{source}}
Thomas-Boi Oct 9, 2020
e5cd0ef
Built new icons, icomoon.json and devicon.css
Thomas-Boi Oct 9, 2020
a34f7fd
Merge pull request #307 from devicons/build/upgrade-workflow
amacado Oct 9, 2020
8f863d6
Merge pull request #301 from devicons/upgrade-workflow
Thomas-Boi Oct 9, 2020
5ce9bc0
#306: Add Jenkins icons
tariq86 Oct 9, 2020
d04e1ed
#306: Add Jenkins to devicon.json and devicon.css
tariq86 Oct 9, 2020
940fd13
Updated the CONTRIBUTING.md, README.md and code doc
Thomas-Boi Oct 9, 2020
318e2df
Added colored class and change README.md
Thomas-Boi Oct 9, 2020
b7a8a0a
Added code to ensure we always get run log
Thomas-Boi Oct 9, 2020
f5a247f
Built new icons, icomoon.json and devicon.css
Thomas-Boi Oct 9, 2020
bf0d48c
Merge pull request #312 from devicons/build/readme-update
Thomas-Boi Oct 9, 2020
dad9f61
Added a section on svg standards to CONTRIBUTING.md
Thomas-Boi Oct 9, 2020
ec72578
#301: Add fixed Jenkins logos
tariq86 Oct 10, 2020
f59513c
Merge pull request #311 from devicons/readme-update
amacado Oct 11, 2020
352bb8a
Fix an error in CONTRIBUTING.md
Thomas-Boi Oct 12, 2020
170349a
Merge pull request #313 from devicons/fix-icons
Thomas-Boi Oct 12, 2020
da0c8ce
Fix it so mocha now have a plain font
Thomas-Boi Oct 12, 2020
7dc4242
Built new icons, icomoon.json and devicon.css
Thomas-Boi Oct 12, 2020
0fe65a0
Merge pull request #315 from devicons/build/fix-icons
Thomas-Boi Oct 12, 2020
e6cb7bb
Add screenshot code, update the CONTRIBUTING.md and fix clojure
Thomas-Boi Oct 12, 2020
8a3b56b
Built new icons, icomoon.json and devicon.css
Thomas-Boi Oct 12, 2020
49c747b
Merge pull request #316 from devicons/build/fix-icons
Thomas-Boi Oct 12, 2020
0757cec
Add new_icons.png to gitignore. Fixed yunohost, clojure, clojurescrip…
Thomas-Boi Oct 12, 2020
474b347
Merge branch 'fix-icons' of https://github.com/devicons/devicon into …
Thomas-Boi Oct 12, 2020
24df880
Fix the yunohost-plain.svg
Thomas-Boi Oct 12, 2020
ac9dc6a
Built new icons, icomoon.json and devicon.css
Thomas-Boi Oct 12, 2020
739625e
Merge pull request #317 from devicons/build/fix-icons
Thomas-Boi Oct 12, 2020
e7caa16
Merge pull request #314 from devicons/fix-icons
Thomas-Boi Oct 12, 2020
c95a8a1
Fix the delete-branch arg in the workflow yaml
Thomas-Boi Oct 12, 2020
efa33b8
Merge pull request #318 from devicons/fix-icons
Thomas-Boi Oct 12, 2020
e9c25c2
Merge remote-tracking branch 'upstream/develop' into feature/306-jenkins
tariq86 Oct 12, 2020
b1de9dc
Fix css color not including the aliases
Thomas-Boi Oct 12, 2020
96231aa
Change the repo reference in the workflow
Thomas-Boi Oct 12, 2020
bfe1569
Added a peek script
Thomas-Boi Oct 16, 2020
f140e07
Merge pull request #320 from Thomas-Boi/TB_bugFix
Thomas-Boi Oct 16, 2020
4854e82
Remove the new_icons.png and update CONTRIBUTING.md
Thomas-Boi Oct 16, 2020
ceb32da
Merge pull request #323 from Thomas-Boi/TB_bugFix
Thomas-Boi Oct 16, 2020
4001786
Fixed an error where last commit didn't have desired changes
Thomas-Boi Oct 16, 2020
d480883
Merge pull request #324 from Thomas-Boi/TB_bugFix
Thomas-Boi Oct 16, 2020
5fc6041
Merge remote-tracking branch 'upstream/develop' into feature/306-jenkins
tariq86 Oct 16, 2020
ed801c4
Merge pull request #309 from tariq86/feature/306-jenkins
Thomas-Boi Oct 17, 2020
1234aac
Added a peek script
Thomas-Boi Oct 16, 2020
9565579
Added a comment action and fix async issue in python script
Thomas-Boi Oct 17, 2020
ea3a0bf
Removed jenkins-plain as an icon in devicon.json
Thomas-Boi Oct 17, 2020
82fd3d2
Merge pull request #325 from devicons/TB_bugFix
Thomas-Boi Oct 17, 2020
4c6c9dd
#309: plainer plain Jenkins icon
tariq86 Oct 17, 2020
dc781d2
Fixed an issue with mocha plain not in the correct viewbox
Thomas-Boi Oct 18, 2020
c5d9eb5
Update jenkins.eps with fixed plain icon
tariq86 Oct 20, 2020
35c98b8
Re-add plain to Jenkins' font icons
tariq86 Oct 20, 2020
34de065
Merge pull request #331 from tariq86/feature/306-jenkins
Thomas-Boi Oct 21, 2020
7a1425a
Updated the CONTRIBUTING.md
Thomas-Boi Oct 21, 2020
c76ba93
Commented out the comment bot
Thomas-Boi Oct 21, 2020
cc4266e
Build script now run manually
Thomas-Boi Oct 21, 2020
60b90e7
Merge branch 'develop' of https://github.com/devicons/devicon into de…
ezSaldana Oct 22, 2020
07fee18
Merge branch 'develop' into kotlin
ezSaldana Oct 22, 2020
c4c872e
Merge pull request #333 from devicons/TB_bugFix
amacado Oct 22, 2020
20166ab
Deleted flutter icons
ezSaldana Oct 22, 2020
77f68da
Merge pull request #297 from ezSaldana/kotlin
amacado Oct 23, 2020
0509bbe
Added original and plain after effects icons with eps file
ezSaldana Oct 24, 2020
a6ff776
Added after efects icon to json
ezSaldana Oct 24, 2020
4b58ed1
Added premiere pro original and plain svg icons and eps file
ezSaldana Oct 24, 2020
0ba58e4
Added premiere pro original and plain icons to json file
ezSaldana Oct 24, 2020
817d54a
Added original and plain flutter icons wit eps file
ezSaldana Oct 24, 2020
6839f86
Added original and plain flutter icons to json file
ezSaldana Oct 24, 2020
f6ca272
Merge pull request #338 from ezSaldana/flutterNew
amacado Oct 24, 2020
0a9e73d
Added original and plain haxe svg icons with eps file
ezSaldana Oct 25, 2020
979d865
Added original and plain haxe icons to json file
ezSaldana Oct 25, 2020
102e29e
Added original an plain woocommerce svg icons and eps file
ezSaldana Oct 25, 2020
66d531a
Added original and plain woocmmerce icons to json file
ezSaldana Oct 25, 2020
e2402dc
Added original and plain workmark woocommerce svg icons and eps file
ezSaldana Oct 25, 2020
d081122
Added original and plain woocommerce wordmark icons to json file
ezSaldana Oct 25, 2020
9e23ba0
Changed haxe base branding color to EA8220
ezSaldana Oct 25, 2020
fb61ee0
Changed base branding color to 7f54b3
ezSaldana Oct 25, 2020
380814b
Merge pull request #339 from ezSaldana/haxe
amacado Oct 25, 2020
1b2a0fc
Added original, original-wordmark and plain-wordmark svg icons with e…
ezSaldana Oct 26, 2020
b08a42b
Added original, plain and original wordmark icons to json file
ezSaldana Oct 27, 2020
c8f2456
Added plain svg icon and to eps
ezSaldana Oct 27, 2020
fef2575
Added plain svg to json file
ezSaldana Oct 27, 2020
2fcbe77
Added plain and wormark svg icons and eps file
ezSaldana Oct 27, 2020
617eadb
Added nestjs plain icons to json file
ezSaldana Oct 27, 2020
350536b
Added original and plain svg icons and eps file
ezSaldana Oct 30, 2020
e16106b
Added original and plain icons to json file
ezSaldana Oct 30, 2020
3567025
Merge pull request #342 from ezSaldana/feature/308-gatsby
amacado Oct 30, 2020
1312d53
Merge pull request #343 from ezSaldana/feature/341-nestjs
amacado Oct 30, 2020
48bd539
Merge pull request #352 from ezSaldana/materialui
amacado Oct 30, 2020
b06d540
Changing premierepro file names
ezSaldana Oct 30, 2020
28015e1
Changed premierepro file names to lowercase
ezSaldana Oct 30, 2020
f64b0a9
Changing aftereffects file names
ezSaldana Oct 30, 2020
ff5c774
Changed aftereffects file names to lowercase
ezSaldana Oct 30, 2020
1ab658a
Fixed plain icons design and svg files
ezSaldana Oct 30, 2020
dcaae75
Merge pull request #340 from ezSaldana/feature/330-woocommerce
amacado Oct 31, 2020
10c9c81
Merge pull request #336 from ezSaldana/afterEffects
amacado Oct 31, 2020
2f2070e
Fixed premierepro file names
ezSaldana Oct 31, 2020
0b462e3
Merge pull request #337 from ezSaldana/premierePro
amacado Oct 31, 2020
63984da
#355: Add Composer SVGs
Nov 3, 2020
f5d09cc
Add Composer to devicon.json
Nov 3, 2020
925d61f
Update Composer icons
Nov 3, 2020
020e1c5
Add Composer icon aliases
Nov 3, 2020
ae94483
Add TYPO3 icon (original, original-wordmark, plain, plain-wordmark)
alexander-nitsche Oct 30, 2020
7bc90f1
Merge pull request #356 from tariq86/icons/composer
Thomas-Boi Nov 5, 2020
3d982a9
Merge pull request #358 from alexander-nitsche/feature/icon-typo3
Thomas-Boi Nov 6, 2020
574a999
Update TYPO3 icon (original, original-wordmark, plain, plain-wordmark)
alexander-nitsche Nov 9, 2020
8c63f66
Merge pull request #361 from alexander-nitsche/feature/icon-typo3
amacado Nov 9, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 25 additions & 13 deletions .github/scripts/build_assets/SeleniumRunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,26 @@ class SeleniumRunner:
"""
ICOMOON_URL = "https://icomoon.io/app/#/select"

def __init__(self, icomoon_json_path: str, download_path: str,
geckodriver_path: str, headless):
def __init__(self, download_path: str,
geckodriver_path: str, headless: bool):
"""
Create a SeleniumRunner object.
:param icomoon_json_path: a path to the iconmoon.json.
:param download_path: the location where you want to download
the icomoon.zip to.
:param geckodriver_path: the path to the firefox executable.
:param headless: whether to run browser in headless (no UI) mode.
"""
self.icomoon_json_path = icomoon_json_path
self.download_path = download_path
self.driver = None
self.set_options(geckodriver_path, headless)
self.set_options(download_path, geckodriver_path, headless)

def set_options(self, geckodriver_path: str, headless: bool):
def set_options(self, download_path: str, geckodriver_path: str,
headless: bool):
"""
Build the WebDriver with Firefox Options allowing downloads and
set download to download_path.
:param download_path: the location where you want to download
:param geckodriver_path: the path to the firefox executable.
the icomoon.zip to.
:param headless: whether to run browser in headless (no UI) mode.

:raises AssertionError: if the page title does not contain
Expand All @@ -69,25 +69,34 @@ def set_options(self, geckodriver_path: str, headless: bool):

# set the default download path to downloadPath
options.set_preference("browser.download.folderList", 2)
options.set_preference("browser.download.dir", self.download_path)
options.set_preference("browser.download.dir", download_path)
options.headless = headless

self.driver = WebDriver(options=options, executable_path=geckodriver_path)
self.driver.get(self.ICOMOON_URL)
assert "IcoMoon App" in self.driver.title

def upload_icomoon(self):

# wait until the whole web page is loaded by testing the hamburger input
hamburger_input = WebDriverWait(self.driver, SeleniumRunner.LONG_WAIT_IN_SEC).until(
ec.element_to_be_clickable((By.CSS_SELECTOR,
"button.btn5.lh-def.transparent i.icon-menu"))
)
hamburger_input.click()
print("Accessed icomoon.io")

def upload_icomoon(self, icomoon_json_path: str):
"""
Upload the icomoon.json to icomoon.io.
:param icomoon_json_path: a path to the iconmoon.json.
:raises TimeoutException: happens when elements are not found.
"""
print("Uploading icomoon.json file...")
try:
# find the file input and enter the file path
import_btn = WebDriverWait(self.driver, SeleniumRunner.LONG_WAIT_IN_SEC).until(
ec.presence_of_element_located((By.CSS_SELECTOR, "div#file input"))
ec.element_to_be_clickable((By.CSS_SELECTOR, "div#file input"))
)
import_btn.send_keys(self.icomoon_json_path)
import_btn.send_keys(icomoon_json_path)
except Exception as e:
self.close()
raise e
Expand Down Expand Up @@ -130,11 +139,14 @@ def upload_svgs(self, svgs: List[str]):
self.test_for_possible_alert(self.SHORT_WAIT_IN_SEC, "Dismiss")
self.remove_color_from_icon()

# take a screenshot of the icons that were just added
self.driver.save_screenshot("new_icons.png");
self.click_hamburger_input()
select_all_button = WebDriverWait(self.driver, self.LONG_WAIT_IN_SEC).until(
ec.element_to_be_clickable((By.XPATH, "//button[text()='Select All']"))
)
select_all_button.click()
print("Finished uploading the svgs...")
except Exception as e:
self.close()
raise e
Expand All @@ -152,7 +164,7 @@ def click_hamburger_input(self):
)

menu_appear_callback = ec.element_to_be_clickable(
(By.CSS_SELECTOR, "h1#setH2 ul")
(By.CSS_SELECTOR, "h1 ul.menuList2")
)

while not menu_appear_callback(self.driver):
Expand Down
12 changes: 7 additions & 5 deletions .github/scripts/build_assets/filehandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
def find_new_icons(devicon_json_path: str, icomoon_json_path: str) -> List[dict]:
"""
Find the newly added icons by finding the difference between
the devicon_test.json and the icomoon_test.json.
:param devicon_json_path, the path to the devicon_test.json.
the devicon.json and the icomoon.json.
:param devicon_json_path, the path to the devicon.json.
:param icomoon_json_path: a path to the iconmoon.json.
:return: a list of the new icons as JSON objects.
"""
Expand All @@ -33,8 +33,8 @@ def is_not_in_icomoon_json(icon, icomoon_json) -> bool:
Checks whether the icon's name is not in the icomoon_json.
:param icon: the icon object we are searching for.
:param icomoon_json: the icomoon json object parsed from
icomoon_test.json.
:return: True if icon's name is not in the icomoon_test.json, else False.
icomoon.json.
:return: True if icon's name is not in the icomoon.json, else False.
"""
pattern = re.compile(f"^{icon['name']}-")

Expand All @@ -46,7 +46,7 @@ def is_not_in_icomoon_json(icon, icomoon_json) -> bool:

def get_svgs_paths(new_icons: List[dict], icons_folder_path: str) -> List[str]:
"""
Get all the suitable svgs file path listed in the devicon_test.json.
Get all the suitable svgs file path listed in the devicon.json.
:param new_icons, a list containing the info on the new icons.
:param icons_folder_path, the path where the function can find the
listed folders.
Expand All @@ -66,7 +66,9 @@ def get_svgs_paths(new_icons: List[dict], icons_folder_path: str) -> List[str]:
aliases = [] # create empty list of aliases if not provided in devicon.json

for font_version in icon_info["versions"]["font"]:
# if it's an alias, we don't want to make it into an icon
if is_alias(font_version, aliases):
print(f"Not exist {icon_info['name']}-{font_version}.svg")
continue

file_name = f"{icon_info['name']}-{font_version}.svg"
Expand Down
63 changes: 63 additions & 0 deletions .github/scripts/icomoon_peek.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
from pathlib import Path
from argparse import ArgumentParser
from selenium.common.exceptions import TimeoutException

# pycharm complains that build_assets is an unresolved ref
# don't worry about it, the script still runs
from build_assets.SeleniumRunner import SeleniumRunner
from build_assets import filehandler
from build_assets.PathResolverAction import PathResolverAction


def main():
parser = ArgumentParser(description="Upload svgs to Icomoon to create icon files.")

parser.add_argument("--headless",
help="Whether to run the browser in headless/no UI mode",
action="store_true")

parser.add_argument("geckodriver_path",
help="The path to the firefox executable file",
action=PathResolverAction)

parser.add_argument("icomoon_json_path",
help="The path to the icomoon.json aka the selection.json created by Icomoon",
action=PathResolverAction)

parser.add_argument("devicon_json_path",
help="The path to the devicon.json",
action=PathResolverAction)

parser.add_argument("icons_folder_path",
help="The path to the icons folder",
action=PathResolverAction)

parser.add_argument("download_path",
help="The path where you'd like to download the Icomoon files to",
action=PathResolverAction)

args = parser.parse_args()

new_icons = filehandler.find_new_icons(args.devicon_json_path, args.icomoon_json_path)
if len(new_icons) == 0:
print("No files need to be peek. Ending script...")
return

# print list of new icons, separated by comma
print("List of new icons:")
print(*new_icons, sep = "\n")
try:
runner = SeleniumRunner(args.download_path,
args.geckodriver_path, args.headless)
svgs = filehandler.get_svgs_paths(new_icons, args.icons_folder_path)
runner.upload_svgs(svgs)
runner.close()
print("Task completed.")
except TimeoutException as e:
print(e)
print(e.stacktrace)
runner.close()


if __name__ == "__main__":
main()
4 changes: 2 additions & 2 deletions .github/scripts/icomoon_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ def main():
print("List of new icons:")
print(*new_icons, sep = "\n")
try:
runner = SeleniumRunner(args.icomoon_json_path, args.download_path,
runner = SeleniumRunner(args.download_path,
args.geckodriver_path, args.headless)
runner.upload_icomoon()
runner.upload_icomoon(args.icomoon_json_path)
svgs = filehandler.get_svgs_paths(new_icons, args.icons_folder_path)
runner.upload_svgs(svgs)

Expand Down
34 changes: 21 additions & 13 deletions .github/workflows/build_icons.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
name: Build Icons
on:
pull_request:
branches:
- master
push:
branches:
- master
on: workflow_dispatch
jobs:
build:
name: Get Fonts From Icomoon
Expand All @@ -14,6 +8,7 @@ jobs:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
repository: ${{ github.event.pull_request.head.repo.full_name}}
- name: Setup Python v3.8
uses: actions/setup-python@v2
with:
Expand All @@ -30,13 +25,26 @@ jobs:
./icomoon.json ./devicon.json ./icons ./ --headless
- name: Upload geckodriver.log for debugging purposes
uses: actions/upload-artifact@v2
if: ${{failure()}}
with:
name: geckodriver-log
path: ./geckodriver.log
- name: Running gulp default task for building devicon.min.css
run: |
gulp default
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
- name: Upload screenshot of the newly made icons
uses: actions/upload-artifact@v2
if: ${{success()}}
with:
name: new_icons
path: ./new_icons.png
- name: Running npm task for building devicon.min.css
if: ${{ success() }}
run: npm run build-css
- name: Create Pull Request
if: ${{ success() }}
uses: peter-evans/create-pull-request@v3
with:
commit_message: Build new icons, icomoon.json and devicon.css
branch: ${{ format('build/{0}', github.head_ref) }}
base: 'develop'
commit-message: 'Built new icons, icomoon.json and devicon.css'
title: 'bot:build new icons, icomoon.json and devicon.css'
body: 'Automated font-building task ran by GitHub Actions bot'
delete-branch: true
54 changes: 54 additions & 0 deletions .github/workflows/peek_icons.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Peek Icons
on:
pull_request:
types: [labeled]
jobs:
build:
name: Get Fonts From Icomoon
if: contains(github.event.pull_request.labels.*.name, 'bot:peek')
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
repository: ${{ github.event.pull_request.head.repo.full_name}}
- name: Setup Python v3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies (python, pip, npm)
run: |
python -m pip install --upgrade pip
pip install -r ./.github/scripts/requirements.txt
npm install
- name: Run icomoon_peek.py
run: >
python ./.github/scripts/icomoon_peek.py
./.github/scripts/build_assets/geckodriver-v0.27.0-win64/geckodriver.exe
./icomoon.json ./devicon.json ./icons ./ --headless
- name: Upload geckodriver.log for debugging purposes
uses: actions/upload-artifact@v2
if: ${{failure()}}
with:
name: geckodriver-log
path: ./geckodriver.log
- name: Upload screenshot of the newly made icons
uses: actions/upload-artifact@v2
if: ${{success()}}
with:
name: new_icons
path: ./new_icons.png
# - name: Comment on the PR about the result
# uses: github-actions-up-and-running/pr-comment@v1.0.1
# with:
# repo-token: ${{ secrets.GITHUB_TOKEN }}
# message: >
# Hi! I'm Devicons' GitHub Actions Bot!

# I just peeked at the icons that you wanted to add and upload them to the
# [Actions page](https://github.com/devicons/devicon/actions). The maintainers
# will now take a look at it and decide whether to merge your PR.

# Cheers :),

# Bot
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ node_modules
.idea
geckodriver.log
__pycache__
*.pyc
*.pyc
new_icons.png
Loading