Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
howto-cards LEGACY VERSION
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
R3
howto-cards LEGACY VERSION
Commits
cd8dc864
Verified
Commit
cd8dc864
authored
3 years ago
by
Laurent Heirendt
Browse files
Options
Downloads
Patches
Plain Diff
cleanup and comments
parent
0a601f5e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!324
[release] Regular merge of develop
,
!323
changes to index generator to include legacy links
Pipeline
#50617
passed
3 years ago
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.ci/generateIndex.py
+5
-7
5 additions, 7 deletions
.ci/generateIndex.py
with
5 additions
and
7 deletions
.ci/generateIndex.py
+
5
−
7
View file @
cd8dc864
...
...
@@ -46,26 +46,23 @@ def save_legacy_from(localroot, root, filename):
legacy_from
=
[]
os
.
chdir
(
root
)
# count the number of lines
count
=
0
headerCheck
=
False
legacy_from_flag
=
False
with
open
(
filename
,
'
r
'
)
as
f
:
for
line
in
f
:
count
+=
1
# check for the start of the section
if
line
[
0
:
12
]
==
"
legacy_from:
"
:
legacy_from_flag
=
True
#legacy_from_line_start = count
# append lines from the legacy section
if
legacy_from_flag
and
line
[
0
:
12
]:
legacy_from
.
append
(
line
)
# check for the end of the header
if
legacy_from_flag
and
line
[
0
:
3
]
==
"
---
"
:
#legacy_from_line_end = count
legacy_from_flag
=
False
print
(
legacy_from
)
# change back to the local root
os
.
chdir
(
localroot
)
...
...
@@ -160,7 +157,7 @@ for folder in cardDirs:
if
file
[
0
]
!=
"
_
"
:
print
(
"
> Generating header for:
"
+
fileName
)
# save legacy
from
# save legacy
section
legacy_from
=
save_legacy_from
(
localroot
,
root
,
file
)
# remove the previous header
...
...
@@ -195,6 +192,7 @@ for folder in cardDirs:
header
+=
"
- /cards/
"
+
root_handbook
(
shortcut
)
+
"
\n
"
header
+=
"
- /
"
+
folder
+
"
/cards/
"
+
root_handbook
(
shortcut
)
+
"
\n
"
# include the legacy section
if
len
(
legacy_from
)
>
0
:
for
item
in
legacy_from
:
header
+=
str
(
item
)
...
...
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