Skip to content

Commit

Permalink
hard-coding to amd64
Browse files Browse the repository at this point in the history
  • Loading branch information
Anders Schwartz committed Nov 14, 2023
1 parent a7df8cf commit 82fab02
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 29 deletions.
12 changes: 6 additions & 6 deletions core/files_artifacts_expander/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ BUILD_DIRNAME="build"

DEFAULT_SKIP_DOCKER_IMAGE_BUILDING=false

DEFAULT_ARCHITECTURE_TO_BUILD="unknown"
DEFAULT_ARCHITECTURE_TO_BUILD="amd64"

if [ "$uname_arch" == "x86_64" ] || [ "$uname_arch" == "amd64" ]; then
DEFAULT_ARCHITECTURE_TO_BUILD="amd64"
elif [ "$uname_arch" == "aarch64" ] || [ "$uname_arch" == "arm64" ]; then
DEFAULT_ARCHITECTURE_TO_BUILD="arm64"
fi
#if [ "$uname_arch" == "x86_64" ] || [ "$uname_arch" == "amd64" ]; then
# DEFAULT_ARCHITECTURE_TO_BUILD="amd64"
#elif [ "$uname_arch" == "aarch64" ] || [ "$uname_arch" == "arm64" ]; then
# DEFAULT_ARCHITECTURE_TO_BUILD="arm64"
#fi

MAIN_GO_FILEPATH="${expander_root_dirpath}/main.go"
MAIN_BINARY_OUTPUT_FILENAME="files-artifacts-expander"
Expand Down
12 changes: 6 additions & 6 deletions core/server/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ BUILD_DIRNAME="build"

DEFAULT_SKIP_DOCKER_IMAGE_BUILDING=false

DEFAULT_ARCHITECTURE_TO_BUILD="unknown"
DEFAULT_ARCHITECTURE_TO_BUILD="amd64"

if [ "$uname_arch" == "x86_64" ] || [ "$uname_arch" == "amd64" ]; then
DEFAULT_ARCHITECTURE_TO_BUILD="amd64"
elif [ "$uname_arch" == "aarch64" ] || [ "$uname_arch" == "arm64" ]; then
DEFAULT_ARCHITECTURE_TO_BUILD="arm64"
fi
#if [ "$uname_arch" == "x86_64" ] || [ "$uname_arch" == "amd64" ]; then
# DEFAULT_ARCHITECTURE_TO_BUILD="amd64"
#elif [ "$uname_arch" == "aarch64" ] || [ "$uname_arch" == "arm64" ]; then
# DEFAULT_ARCHITECTURE_TO_BUILD="arm64"
#fi

MAIN_DIRNAME="api_container"
MAIN_GO_FILEPATH="${server_root_dirpath}/${MAIN_DIRNAME}/main.go"
Expand Down
12 changes: 6 additions & 6 deletions engine/server/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ BUILD_DIRNAME="build"

DEFAULT_SKIP_DOCKER_IMAGE_BUILDING=false

DEFAULT_ARCHITECTURE_TO_BUILD="unknown"
DEFAULT_ARCHITECTURE_TO_BUILD="amd64"

if [ "$uname_arch" == "x86_64" ] || [ "$uname_arch" == "amd64" ]; then
DEFAULT_ARCHITECTURE_TO_BUILD="amd64"
elif [ "$uname_arch" == "aarch64" ] || [ "$uname_arch" == "arm64" ]; then
DEFAULT_ARCHITECTURE_TO_BUILD="arm64"
fi
#if [ "$uname_arch" == "x86_64" ] || [ "$uname_arch" == "amd64" ]; then
# DEFAULT_ARCHITECTURE_TO_BUILD="amd64"
#elif [ "$uname_arch" == "aarch64" ] || [ "$uname_arch" == "arm64" ]; then
# DEFAULT_ARCHITECTURE_TO_BUILD="arm64"
#fi

MAIN_DIRNAME="engine"
MAIN_GO_FILEPATH="${engine_root_dirpath}/${MAIN_DIRNAME}/main.go"
Expand Down
12 changes: 1 addition & 11 deletions scripts/docker-image-builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,12 @@ if [ -z "${image_tags}" ]; then
show_helptext_and_exit
fi

uname_arch=$(uname -m)

architecture="amd64"

if [ "$uname_arch" == "x86_64" ] || [ "$uname_arch" == "amd64" ]; then
architecture="amd64"
elif [ "$uname_arch" == "aarch64" ] || [ "$uname_arch" == "arm64" ]; then
architecture="arm64"
fi

# Argument processing
if "${push_to_registry_container}"; then
buildx_platform_arg='linux/arm64/v8,linux/amd64'
push_flag='--push'
else
buildx_platform_arg="linux/${architecture}"
buildx_platform_arg='linux/amd64' # TODO: infer the local arch if that's reasonable
push_flag='--load'
fi
echo "Building docker image for architecture '${buildx_platform_arg}' with flag '${push_flag}'"
Expand Down

0 comments on commit 82fab02

Please sign in to comment.