1
0
mirror of https://github.com/konpa/devicon.git synced 2025-08-31 10:02:12 +02:00

Added __pycache__ to gitignore. Documented geckodriver. Invalid path now throws error

This commit is contained in:
Thomas Bui
2020-09-02 09:29:39 -07:00
parent 83378fa698
commit 33b07225bf
9 changed files with 13 additions and 132 deletions

View File

@@ -78,7 +78,7 @@ class SeleniumRunner:
def upload_icomoon(self):
"""
Upload the icomoon_test.json to icomoon.io.
Upload the icomoon.json to icomoon.io.
:raises TimeoutException: happens when elements are not found.
"""
print("Uploading JSON file...")
@@ -89,7 +89,6 @@ class SeleniumRunner:
)
import_btn.send_keys(self.icomoon_json_path)
except Exception as e:
print("hi")
self.close()
raise e
@@ -100,8 +99,8 @@ class SeleniumRunner:
confirm_btn.click()
except SeleniumTimeoutException as e:
print(e.stacktrace)
print("Cannot find the confirm button when uploading the icomoon_test.json",
"Ensure that the icomoon_test.json is in the correct format for Icomoon.io",
print("Cannot find the confirm button when uploading the icomoon.json",
"Ensure that the icomoon.json is in the correct format for Icomoon.io",
sep='\n')
self.close()

View File

@@ -56,9 +56,8 @@ def get_svgs_paths(new_icons: List[dict], icons_folder_path: str) -> List[str]:
for icon_info in new_icons:
folder_path = Path(icons_folder_path, icon_info['name'])
if not (folder_path.exists() and folder_path.is_dir()):
print(f"Invalid path. This is not a directory: {folder_path}\nSkipping entry...")
continue
if not folder_path.is_dir():
raise ValueError(f"Invalid path. This is not a directory: {folder_path}.")
try:
aliases = icon_info["aliases"]
@@ -74,6 +73,8 @@ def get_svgs_paths(new_icons: List[dict], icons_folder_path: str) -> List[str]:
if path.exists():
file_paths.append(str(path))
else:
raise ValueError(f"This path doesn't exist: {path}")
return file_paths

View File

@@ -0,0 +1 @@
This folder was taken from: https://github.com/mozilla/geckodriver/releases/tag/v0.27.0

Binary file not shown.

View File

@@ -1,14 +1,5 @@
name: Build Icons
on:
# Trigger the workflow on push or pull request,
# but only for the master branch
push:
branches:
- master
pull_request:
branches:
- master
on: push
jobs:
build:
name: Get Fonts From Icomoon
@@ -25,7 +16,8 @@ jobs:
pip install -r ./.github/scripts/requirements.txt
- name: Run icomoon_upload.py
run: >
python ./.github/scripts/icomoon_upload.py ./.github/scripts/build_assets/geckodriver.exe
python ./.github/scripts/icomoon_upload.py
./.github/scripts/build_assets/geckodriver-v0.27.0-win64/geckodriver.exe
./icomoon.json ./devicon.json ./icons ./built_files --headless
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4