From 1f9b064577a65935b3f14723bb6db60f3a602686 Mon Sep 17 00:00:00 2001 From: Matt Hauck Date: Wed, 18 Oct 2023 12:52:18 -0700 Subject: [PATCH] Fix build.py for python3 Also: remove test from docker build script --- build.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/build.py b/build.py index 844ba8ff..323baa30 100755 --- a/build.py +++ b/build.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import os import re @@ -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") @@ -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")