Maint: use curly braces around BUILDPLATFORM
@@ -5,10 +5,10 @@ ARG XCPUTRANSLATE_VERSION=v0.6.0
ARG GOLANGCI_LINT_VERSION=v1.41.1
ARG BUILDPLATFORM=linux/amd64
-FROM --platform=$BUILDPLATFORM qmcgaw/xcputranslate:${XCPUTRANSLATE_VERSION} AS xcputranslate
+FROM --platform=${BUILDPLATFORM} qmcgaw/xcputranslate:${XCPUTRANSLATE_VERSION} AS xcputranslate
FROM --platform=${BUILDPLATFORM} qmcgaw/binpot:golangci-lint-${GOLANGCI_LINT_VERSION} AS golangci-lint
-FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine${GO_ALPINE_VERSION} AS base
+FROM --platform=${BUILDPLATFORM} golang:${GO_VERSION}-alpine${GO_ALPINE_VERSION} AS base
COPY --from=xcputranslate /xcputranslate /usr/local/bin/xcputranslate
RUN apk --update add git g++
ENV CGO_ENABLED=0
@@ -19,18 +19,18 @@ RUN go mod download
COPY cmd/ ./cmd/
COPY internal/ ./internal/
-FROM --platform=$BUILDPLATFORM base AS test
+FROM --platform=${BUILDPLATFORM} base AS test
# Note on the go race detector:
# - we set CGO_ENABLED=1 to have it enabled
# - we installed g++ to support the race detector
ENV CGO_ENABLED=1
ENTRYPOINT go test -race -coverpkg=./... -coverprofile=coverage.txt -covermode=atomic ./...
-FROM --platform=$BUILDPLATFORM base AS lint
+FROM --platform=${BUILDPLATFORM} base AS lint
COPY .golangci.yml ./
RUN golangci-lint run --timeout=10m
-FROM --platform=$BUILDPLATFORM base AS tidy
+FROM --platform=${BUILDPLATFORM} base AS tidy
RUN git init && \
git config user.email ci@localhost && \
git config user.name ci && \
@@ -39,7 +39,7 @@ RUN git init && \
go mod tidy && \
git diff --exit-code -- go.mod
-FROM --platform=$BUILDPLATFORM base AS build
+FROM --platform=${BUILDPLATFORM} base AS build
ARG TARGETPLATFORM
ARG ALLTARGETPLATFORMS=${TARGETPLATFORM}
ARG VERSION=unknown
