Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
backoffice_server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
web-et-numerique
Factory
LLLE_Project
backoffice_server
Commits
8441c44f
Commit
8441c44f
authored
1 year ago
by
Rémi PAILHAREY
Browse files
Options
Downloads
Patches
Plain Diff
fix: assets script for inkscape 1.3
parent
17613ec4
Branches
Branches containing commit
No related tags found
1 merge request
!87
Resolve "TECH - Better local config"
Pipeline
#73711
passed
1 year ago
Stage: quality
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.env.template
+1
-1
1 addition, 1 deletion
.env.template
scripts/import-convert-assets.sh
+16
-12
16 additions, 12 deletions
scripts/import-convert-assets.sh
with
17 additions
and
13 deletions
.env.template
+
1
−
1
View file @
8441c44f
...
@@ -5,7 +5,7 @@ ADMIN_ROLE=ADMINS
...
@@ -5,7 +5,7 @@ ADMIN_ROLE=ADMINS
DEBUG_MODE
DEBUG_MODE
MOCK_OAUTH2
MOCK_OAUTH2
HTTPS_PORT
HTTPS_PORT
IMAGE_FOLDER
IMAGE_FOLDER
=mnt/image-lib
# Needed to user OAuth2 authentication :
# Needed to user OAuth2 authentication :
REDIRECT_URL
REDIRECT_URL
...
...
This diff is collapsed.
Click to expand it.
scripts/import-convert-assets.sh
+
16
−
12
View file @
8441c44f
...
@@ -11,25 +11,29 @@ REGISTRY_ID=409
...
@@ -11,25 +11,29 @@ REGISTRY_ID=409
EMAIL_ASSETS_PATH
=
"src/assets/icons/email"
EMAIL_ASSETS_PATH
=
"src/assets/icons/email"
ECOGESTURE_ASSETS_PATH
=
"src/assets/icons/visu/ecogesture"
ECOGESTURE_ASSETS_PATH
=
"src/assets/icons/visu/ecogesture"
# Clear folder
rm
-rf
../
$IMAGE_FOLDER
# Create folder
mkdir
-p
../
$IMAGE_FOLDER
../
$IMAGE_FOLDER
/ecogesture
# Fetch and convert email assets
# Fetch and convert email assets
curl
"https://forge.grandlyon.com/api/v4/projects/
${
REGISTRY_ID
}
/repository/archive?path=
${
EMAIL_ASSETS_PATH
}
"
--output
email.tar.gz
curl
"https://forge.grandlyon.com/api/v4/projects/
${
REGISTRY_ID
}
/repository/archive?path=
${
EMAIL_ASSETS_PATH
}
"
--output
email.tar.gz
tar
-xf
email.tar.gz
tar
-xf
email.tar.gz
cd
*
-email
/
$EMAIL_ASSETS_PATH
&&
for
file
in
*
.svg
;
do
inkscape
-h
200
--export-type
=
"png"
$file
;
done
&&
rm
*
.svg
find
*
-email
/
$EMAIL_ASSETS_PATH
-type
f
-name
"*.svg"
|
while
read
-r
svg_file
;
do
filename
=
"
$(
basename
"
$svg_file
"
.svg
)
"
inkscape
-h
200
-o
../
$IMAGE_FOLDER
/
$filename
.png
*
-email
/
$EMAIL_ASSETS_PATH
/
$filename
.svg
done
rm
*
-email
/
$EMAIL_ASSETS_PATH
/
*
.svg
cd
$WD
# Fetch and convert ecogesture assets
# Fetch and convert ecogesture assets
curl
"https://forge.grandlyon.com/api/v4/projects/
${
REGISTRY_ID
}
/repository/archive?path=
${
ECOGESTURE_ASSETS_PATH
}
"
--output
ecogesture.tar.gz
curl
"https://forge.grandlyon.com/api/v4/projects/
${
REGISTRY_ID
}
/repository/archive?path=
${
ECOGESTURE_ASSETS_PATH
}
"
--output
ecogesture.tar.gz
tar
-xf
ecogesture.tar.gz
tar
-xf
ecogesture.tar.gz
cd
*
-ecogesture
/
$ECOGESTURE_ASSETS_PATH
&&
for
file
in
*
.svg
;
do
inkscape
-h
200
--export-type
=
"png"
$file
;
done
&&
rm
*
.svg
find
*
-ecogesture
/
$ECOGESTURE_ASSETS_PATH
-type
f
-name
"*.svg"
|
while
read
-r
svg_file
;
do
filename
=
"
$(
basename
"
$svg_file
"
.svg
)
"
inkscape
-h
200
-o
../
$IMAGE_FOLDER
/ecogesture/
$filename
.png
*
-ecogesture
/
$ECOGESTURE_ASSETS_PATH
/
$filename
.svg
done
rm
*
-ecogesture
/
$ECOGESTURE_ASSETS_PATH
/
*
.svg
# Cleanup
# Cleanup
cd
$WD
rm
-rf
../
$IMAGE_FOLDER
# Create folder
mkdir
../
$IMAGE_FOLDER
# Copy assets in IMAGE_FOLDER
mv
*
-email
/
$EMAIL_ASSETS_PATH
/
*
../
$IMAGE_FOLDER
mv
*
-ecogesture
/
$ECOGESTURE_ASSETS_PATH
../
$IMAGE_FOLDER
/ecogesture
rm
-rf
email.tar.gz ecogesture.tar.gz
*
-email
*
-ecogesture
rm
-rf
email.tar.gz ecogesture.tar.gz
*
-email
*
-ecogesture
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment