Skip to content

Commit

Permalink
update build docker
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuminjie committed Dec 15, 2021
1 parent 3f1c6f7 commit e49436d
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions openseespy-docker/build_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@ def build_docker(version, setup, compile, upload, test_platform, test_type, push
os.chdir(os.path.dirname(os.path.abspath(__file__)))

# copy pip
shutil.rmtree('openseespy-pip')
if os.path.exists('openseespy-pip'):
shutil.rmtree('openseespy-pip')
shutil.copytree('../openseespy-pip', 'openseespy-pip')
shutil.rmtree('openseespylinux-pip')
if os.path.exists('openseespylinux-pip'):
shutil.rmtree('openseespylinux-pip')
shutil.copytree('../openseespylinux-pip', 'openseespylinux-pip')

# copy opensees
shutil.rmtree('opensees')
if os.path.exists('opensees'):
shutil.rmtree('opensees')
shutil.copytree('../opensees', 'opensees')

# version
Expand Down Expand Up @@ -165,6 +168,7 @@ def build_docker(version, setup, compile, upload, test_platform, test_type, push
test_platform = None
test_type = 'test-test'
push = False
runDocker = True
for i in range(1, len(sys.argv)):
if sys.argv[i] == 'push':
push = True
Expand All @@ -183,5 +187,8 @@ def build_docker(version, setup, compile, upload, test_platform, test_type, push
elif sys.argv[i] == 'clear':
subprocess.run(['docker',
'system', 'prune', '-a', ])
runDocker = False

build_docker(version, setup, compile, upload, test_platform, test_type, push)
if runDocker:
build_docker(version, setup, compile, upload,
test_platform, test_type, push)

0 comments on commit e49436d

Please sign in to comment.