Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
50ebcd2d
Commit
50ebcd2d
authored
Sep 06, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
log preview URL
parent
4d052764
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
.gitignore
deploy/tools/favicon-generator/.gitignore
+1
-0
script.sh
deploy/tools/favicon-generator/script.sh
+4
-3
No files found.
deploy/tools/favicon-generator/.gitignore
View file @
50ebcd2d
/output
config.json
response.json
favicon_package**
\ No newline at end of file
deploy/tools/favicon-generator/script.sh
View file @
50ebcd2d
...
...
@@ -54,6 +54,7 @@ echo "$API_RESPONSE" > response.json
# Parse the JSON response to extract the file URL and remove backslashes
FILE_URL
=
$(
echo
"
$API_RESPONSE
"
| jq
-r
'.favicon_generation_result.favicon.package_url'
|
tr
-d
'\\'
)
PREVIEW_URL
=
$(
echo
"
$API_RESPONSE
"
| jq
-r
'.favicon_generation_result.preview_picture_url'
|
tr
-d
'\\'
)
# Check if FILE_URL is empty
if
[
-z
"
$FILE_URL
"
]
;
then
...
...
@@ -62,6 +63,7 @@ if [ -z "$FILE_URL" ]; then
fi
echo
"🆗 Found following file URL in the response:
$FILE_URL
"
echo
"🆗 Favicon preview URL:
$PREVIEW_URL
"
echo
# Generate a filename based on the URL
...
...
@@ -69,10 +71,9 @@ FILE_NAME=$(basename "$FILE_URL")
# Check if the target folder exists and clear its contents if it does
if
[
-d
"
$TARGET_FOLDER
"
]
;
then
rm
-r
"
$TARGET_FOLDER
"
/
*
else
mkdir
-p
"
$TARGET_FOLDER
"
rm
-r
"
$TARGET_FOLDER
"
fi
mkdir
-p
"
$TARGET_FOLDER
"
# Download the file
echo
"⏳ Trying to download the file..."
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment