Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Castopod
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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Albatroz Jeremias
Castopod
Commits
b870ce55
Commit
b870ce55
authored
2 years ago
by
Yassine Doghri
Browse files
Options
Downloads
Patches
Plain Diff
ci(gitlabci): filter out docs src languages not declared in .i18n-filter file before build
parent
79c553cb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/.gitlab-ci.yml
+2
-0
2 additions, 0 deletions
docs/.gitlab-ci.yml
docs/scripts/i18n-filter.sh
+29
-0
29 additions, 0 deletions
docs/scripts/i18n-filter.sh
docs/src/.i18n-filter
+4
-0
4 additions, 0 deletions
docs/src/.i18n-filter
with
35 additions
and
0 deletions
docs/.gitlab-ci.yml
+
2
−
0
View file @
b870ce55
...
...
@@ -7,6 +7,8 @@ stages:
.documentation-setup
:
before_script
:
-
cd docs
-
chmod +x ./scripts/i18n-filter.sh
-
./scripts/i18n-filter.sh
-
npm ci
cache
:
...
...
This diff is collapsed.
Click to expand it.
docs/scripts/i18n-filter.sh
0 → 100755
+
29
−
0
View file @
b870ce55
#!/bin/bash
# This script deletes language files not declared in the .i18n-filter file
set
-e
# Exit if the directory isn't found
if
[
!
-d
$1
]
then
echo
"
$1
directory does not exist."
exit
fi
cd
$1
# Exit if the .i18n-filter isn't found
if
[[
-f
.i18n-filter
]]
then
# delete all languages not present in .i18n-filter
for
i
in
*
;
do
if
!
grep
-qxFe
"
$i
"
.i18n-filter
;
then
echo
"Deleting:
$i
"
rm
-rf
"
$i
"
fi
done
else
echo
"
$1
/.i18n-filter file not found!"
exit
fi
This diff is collapsed.
Click to expand it.
docs/src/.i18n-filter
0 → 100644
+
4
−
0
View file @
b870ce55
public
contributing
getting-started
index.md
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