Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gcc-cobol
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
COBOLworx
gcc-cobol
Commits
52eedc1f
Commit
52eedc1f
authored
2 years ago
by
Martin Liska
Browse files
Options
Downloads
Patches
Plain Diff
docs: create sources tarball
maintainer-scripts/ChangeLog: * update_web_docs_git.py: Create sources tarball.
parent
4eadbe80
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
maintainer-scripts/update_web_docs_git.py
+29
-0
29 additions, 0 deletions
maintainer-scripts/update_web_docs_git.py
with
29 additions
and
0 deletions
maintainer-scripts/update_web_docs_git.py
+
29
−
0
View file @
52eedc1f
...
...
@@ -37,6 +37,32 @@ def find_configs():
yield
(
Path
(
root
).
resolve
(),
docname
)
def
create_source_tarball
(
output
,
configs
):
pwd
=
Path
(
'
.
'
).
resolve
()
subfolders
=
{
'
doc
'
}
explicit_files
=
{
'
gcc/BASE-VER
'
,
'
gcc/DEV-PHASE
'
,
'
gcc/DATESTAMP
'
}
for
location
,
_
in
configs
:
location
=
location
.
relative_to
(
pwd
)
while
not
location
.
name
==
'
doc
'
:
location
=
location
.
parent
subfolders
.
add
(
location
)
sources
=
Path
(
'
sources
'
)
sources
.
mkdir
()
# Copy all subfolders and files
for
subfolder
in
subfolders
:
shutil
.
copytree
(
subfolder
,
sources
/
subfolder
)
for
filename
in
explicit_files
:
shutil
.
copy
(
filename
,
sources
/
filename
)
shutil
.
make_archive
(
Path
(
output
,
'
docs-sources
'
),
'
gztar
'
,
sources
)
print
(
'
sources tarball has been created
'
)
with
tempfile
.
TemporaryDirectory
()
as
folder
:
print
(
f
'
Using
{
folder
}
as temporary directory
'
)
os
.
chdir
(
folder
)
...
...
@@ -49,6 +75,9 @@ with tempfile.TemporaryDirectory() as folder:
if
not
output
.
exists
():
output
.
mkdir
()
# Create source tarball
create_source_tarball
(
output
,
configs
)
temp
=
Path
(
'
tmp
'
).
resolve
()
temp
.
mkdir
()
...
...
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