Skip to content

Commit

Permalink
Fix build.py for python3 (#369)
Browse files Browse the repository at this point in the history
Also: remove test from docker build script
  • Loading branch information
matthauck authored Oct 18, 2023
1 parent dcbddae commit 4ce4129
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions build.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

import os
import re
Expand Down Expand Up @@ -36,8 +36,6 @@ def run(cmd, ignore_fail=False, quiet=False):

with task("Dockerfile.build"):
run("docker build . -f Dockerfile.build -t octobot:build")
with task("run_tests"):
run("docker run -t --privileged --rm octobot:build")
with task("extract_files"):
run("docker rm -f extract", ignore_fail=True, quiet=True)
run("docker create --name extract octobot:build")
Expand All @@ -47,7 +45,7 @@ def run(cmd, ignore_fail=False, quiet=False):
run("docker rm -f extract")
# write out the version file
commit_hash = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD'])
with open(os.path.join(docker_out, 'version'), 'w') as f:
with open(os.path.join(docker_out, 'version'), 'wb') as f:
f.write(commit_hash)
with task("Dockerfile"):
run("docker build . -t octobot:latest")

0 comments on commit 4ce4129

Please sign in to comment.