Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
integration
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor 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
elixxir
integration
Commits
4e008259
Commit
4e008259
authored
1 year ago
by
Josh Brooks
Browse files
Options
Downloads
Patches
Plain Diff
Fix bug in generation scipt
parent
36f80900
No related branches found
Branches containing commit
No related tags found
1 merge request
!49
Josh/dm package
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
generatePackage.py
+7
-0
7 additions, 0 deletions
generatePackage.py
with
7 additions
and
0 deletions
generatePackage.py
+
7
−
0
View file @
4e008259
...
...
@@ -5,6 +5,7 @@ import os
import
string
import
random
import
argparse
import
re
from
collections.abc
import
Sequence
# Generates a random string
def
random_string
(
stringLength
=
4
):
...
...
@@ -209,6 +210,12 @@ def generate_server_side_config(offset: int, newPackage: string):
f
.
write
(
no_errors
)
if
not
os
.
path
.
exists
(
"
{}/run.sh
"
.
format
(
newPackage
)):
with
open
(
"
{}/run.sh
"
.
format
(
newPackage
),
"
r
"
)
as
f
:
filedata
=
f
.
read
()
newdata
=
re
.
sub
(
r
"
(localhost:)(\d+)
"
,
f
"
localhost:
{
str
(
gateway_ports
[
0
])
}
"
,
filedata
)
with
open
(
"
{}/run.sh
"
.
format
(
newPackage
),
"
w
"
)
as
f
:
f
.
write
(
newdata
)
else
:
with
open
(
"
{}/run.sh
"
.
format
(
newPackage
),
"
w
"
)
as
f
:
run_template
=
run_template
.
replace
(
"
{entry_point}
"
,
str
(
gateway_ports
[
0
]))
f
.
write
(
run_template
)
...
...
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