Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
103
Merge Requests
103
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
4a04e943
Commit
4a04e943
authored
Feb 06, 2023
by
Joanne Hugé
Committed by
Lu Xu
Feb 09, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/ors-amarisoft: add delete option to render-templates script
parent
c3894640
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
software/ors-amarisoft/render-templates
software/ors-amarisoft/render-templates
+16
-0
No files found.
software/ors-amarisoft/render-templates
View file @
4a04e943
#!/usr/bin/env python3
#!/usr/bin/env python3
from
jinja2
import
Template
from
jinja2
import
Template
import
argparse
import
os
import
os
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
'-d'
,
'--delete'
,
action
=
'store_true'
)
args
=
parser
.
parse_args
()
if
args
.
delete
:
directory
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
test_directory
=
os
.
path
.
join
(
directory
,
'test'
)
for
f
in
os
.
listdir
(
directory
):
if
'tdd'
in
f
:
os
.
remove
(
os
.
path
.
join
(
directory
,
f
))
for
f
in
os
.
listdir
(
test_directory
):
if
'testTDD'
in
f
:
os
.
remove
(
os
.
path
.
join
(
test_directory
,
f
))
exit
()
global_context
=
{
global_context
=
{
'generated_file_message'
:
"This file was generated using a jinja2 template and the render-templates script, don't modify directly."
'generated_file_message'
:
"This file was generated using a jinja2 template and the render-templates script, don't modify directly."
}
}
...
...
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