Skip to content

Commit 7bcc3d2

Browse files
committed
Add python script: Generate docker variables from .env
1 parent 7e7a3d5 commit 7bcc3d2

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Diff for: EnvConcatVariables.py renamed to ConcatEnvVariables.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#python
2-
#exec(open("EnvConcatVariables.py").read())
2+
#exec(open("ConcatEnvVariables.py").read())
33
envFile = open(".env","r")
44
result = ""
55
for line in envFile:

Diff for: ConvertToDockerEnvVariables.py

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#python
2+
#exec(open("ConvertToDockerEnvVariables.py").read())
3+
envFile = open(".env","r")
4+
result = ""
5+
for line in envFile:
6+
if len(line) > 1:
7+
elements = line.split("=");
8+
result += elements[0] + ": " + '\"' + elements[1][0:(len(elements[1])-1)]+'\"\r\n';
9+
print(result)

0 commit comments

Comments
 (0)