mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
This caused the following issues: - Slim binaries weren't being updated. - The coder.tar.ztd was misplaced. - There is no coder.sha1 file with proper filenames. This should be reintroduced in a future change with those fixes.
This commit is contained in:
+4
-11
@@ -3,14 +3,14 @@
|
||||
# This script builds a Docker image of Coder containing the given binary, for
|
||||
# the given architecture. Only linux binaries are supported at this time.
|
||||
#
|
||||
# Usage: ./build_docker.sh --arch amd64 [--version 1.2.3] [--target image_tag] [--push] path/to/coder
|
||||
# Usage: ./build_docker.sh --arch amd64 [--version 1.2.3] [--push] path/to/coder
|
||||
#
|
||||
# The --arch parameter is required and accepts a Golang arch specification. It
|
||||
# will be automatically mapped to a suitable architecture that Docker accepts
|
||||
# before being passed to `docker buildx build`.
|
||||
#
|
||||
# The image will be built and tagged against the image tag returned by
|
||||
# ./image_tag.sh unless a --target parameter is supplied.
|
||||
# ./image_tag.sh.
|
||||
#
|
||||
# If no version is specified, defaults to the version from ./version.sh.
|
||||
#
|
||||
@@ -23,11 +23,10 @@ set -euo pipefail
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
|
||||
|
||||
arch=""
|
||||
image_tag=""
|
||||
version=""
|
||||
push=0
|
||||
|
||||
args="$(getopt -o "" -l arch:,target:,version:,push -- "$@")"
|
||||
args="$(getopt -o "" -l arch:,version:,push -- "$@")"
|
||||
eval set -- "$args"
|
||||
while true; do
|
||||
case "$1" in
|
||||
@@ -35,10 +34,6 @@ while true; do
|
||||
arch="$2"
|
||||
shift 2
|
||||
;;
|
||||
--target)
|
||||
image_tag="$2"
|
||||
shift 2
|
||||
;;
|
||||
--version)
|
||||
version="$2"
|
||||
shift 2
|
||||
@@ -70,9 +65,7 @@ if [[ "$version" == "" ]]; then
|
||||
version="$(execrelative ./version.sh)"
|
||||
fi
|
||||
|
||||
if [[ "$image_tag" == "" ]]; then
|
||||
image_tag="$(execrelative ./image_tag.sh --arch "$arch" --version="$version")"
|
||||
fi
|
||||
image_tag="$(execrelative ./image_tag.sh --arch "$arch" --version="$version")"
|
||||
|
||||
if [[ "$#" != 1 ]]; then
|
||||
error "Exactly one argument must be provided to this script, $# were supplied"
|
||||
|
||||
Reference in New Issue
Block a user