Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ ARG GO_STRIP
ARG CGO_ENABLED
# VERSION sets the version for the produced binary
ARG VERSION
# COMPANY_NAME sets the company that produced the windows binary
ARG COMPANY_NAME
# PACKAGER_NAME sets the company that produced the windows binary
ARG PACKAGER_NAME
COPY --from=goversioninfo /out/goversioninfo /usr/bin/goversioninfo
RUN --mount=type=bind,target=.,ro \
--mount=type=cache,target=/root/.cache \
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

# Sets the name of the company that produced the windows binary.
COMPANY_NAME ?=
PACKAGER_NAME ?=

all: binary

Expand Down
4 changes: 2 additions & 2 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ variable "IMAGE_NAME" {
}

# Sets the name of the company that produced the windows binary.
variable "COMPANY_NAME" {
variable "PACKAGER_NAME" {
default = ""
}

Expand All @@ -38,7 +38,7 @@ target "binary" {
args = {
BASE_VARIANT = USE_GLIBC != "" ? "buster" : "alpine"
VERSION = VERSION
COMPANY_NAME = COMPANY_NAME
PACKAGER_NAME = PACKAGER_NAME
GO_STRIP = STRIP_TARGET
}
}
Expand Down
8 changes: 4 additions & 4 deletions docker.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ DOCKER_CLI_CONTAINER_NAME ?=
DOCKER_CLI_GO_BUILD_CACHE ?= y

# Sets the name of the company that produced the windows binary.
COMPANY_NAME ?=
PACKAGER_NAME ?=

DEV_DOCKER_IMAGE_NAME = docker-cli-dev$(IMAGE_TAG)
E2E_IMAGE_NAME = docker-cli-e2e
Expand All @@ -36,7 +36,7 @@ DOCKER_RUN := docker run --rm $(ENVVARS) $(DOCKER_CLI_MOUNTS) $(DOCKER_RUN_NAME_

.PHONY: binary
binary:
COMPANY_NAME=$(COMPANY_NAME) docker buildx bake binary
PACKAGER_NAME=$(PACKAGER_NAME) docker buildx bake binary

build: binary ## alias for binary

Expand All @@ -53,11 +53,11 @@ clean: build_docker_image ## clean build artifacts

.PHONY: cross
cross:
COMPANY_NAME=$(COMPANY_NAME) docker buildx bake cross
PACKAGER_NAME=$(PACKAGER_NAME) docker buildx bake cross

.PHONY: dynbinary
dynbinary: ## build dynamically linked binary
USE_GLIBC=1 COMPANY_NAME=$(COMPANY_NAME) docker buildx bake dynbinary
USE_GLIBC=1 PACKAGER_NAME=$(PACKAGER_NAME) docker buildx bake dynbinary

.PHONY: dev
dev: build_docker_image ## start a build container in interactive mode for in-container development
Expand Down
4 changes: 2 additions & 2 deletions scripts/build/mkversioninfo
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env sh
set -eu

: "${COMPANY_NAME=}"
: "${PACKAGER_NAME=}"

. ./scripts/build/.variables

Expand Down Expand Up @@ -31,7 +31,7 @@ cat > ./cli/winresources/versioninfo.json <<EOL
"StringFileInfo":
{
"Comments": "",
"CompanyName": "${COMPANY_NAME}",
"CompanyName": "${PACKAGER_NAME}",
"FileDescription": "Docker Client",
"FileVersion": "${VERSION}",
"InternalName": "",
Expand Down