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
37c056af
Unverified
Commit
37c056af
authored
Sep 11, 2024
by
tom goriunov
Committed by
GitHub
Sep 11, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Favicon generator: escape special characters in master url (#2225)
favicon generator: escape special characters in master url
parent
f8f7c7bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
script.sh
deploy/tools/favicon-generator/script.sh
+4
-1
No files found.
deploy/tools/favicon-generator/script.sh
View file @
37c056af
...
...
@@ -33,9 +33,12 @@ CONFIG_TEMPLATE_FILE="config.template.json"
# Path to the generated config JSON file
CONFIG_FILE
=
"config.json"
# Escape special characters in MASTER_URL for sed
ESCAPED_MASTER_URL
=
$(
printf
'%s\n'
"
$MASTER_URL
"
|
sed
-e
's/[\/&]/\\&/g'
)
# Replace <api_key> and <master_url> placeholders in the JSON template file
API_KEY_VALUE
=
"
$FAVICON_GENERATOR_API_KEY
"
sed
-e
"s|<api_key>|
$API_KEY_VALUE
|"
-e
"s|<master_url>|
$MASTER_URL
|"
"
$CONFIG_TEMPLATE_FILE
"
>
"
$CONFIG_FILE
"
sed
-e
"s|<api_key>|
$API_KEY_VALUE
|"
-e
"s|<master_url>|
$
ESCAPED_
MASTER_URL
|"
"
$CONFIG_TEMPLATE_FILE
"
>
"
$CONFIG_FILE
"
# Make the API POST request with JSON data from the config file
echo
"⏳ Making request to API..."
...
...
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