Skip to content

Commit

Permalink
pkg(credential-helpers): match min macos version
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <[email protected]>
  • Loading branch information
crazy-max committed Aug 3, 2023
1 parent 2c95ad0 commit 932ff3b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/credential-helpers/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# limitations under the License.

ARG XX_VERSION="1.2.1"
ARG OSXCROSS_VERSION="11.3-r7-debian"
ARG DEBIAN_FRONTEND="noninteractive"

# common args
Expand All @@ -35,8 +36,8 @@ FROM scratch AS common-scripts
# cross compilation helper
FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx

# osxcross contains the MacOSX SDK for xx
FROM dockercore/golang-cross:xx-sdk-extras AS osxsdk
# osxcross contains the MacOSX cross toolchain for xx
FROM crazymax/osxcross:${OSXCROSS_VERSION} AS osxcross

# go base image to retrieve /usr/local/go
FROM ${GO_IMAGE}:${GO_VERSION}-${GO_IMAGE_VARIANT} AS go
Expand Down Expand Up @@ -203,7 +204,7 @@ RUN --mount=type=bind,source=scripts/pkg-static-build.sh,target=/usr/local/bin/p
--mount=type=bind,from=common-scripts,source=fix-cc.sh,target=/usr/local/bin/fix-cc \
--mount=type=bind,from=src,source=/src,target=/usr/local/src/credential-helpers \
--mount=type=bind,from=gocross,source=/usr/local/go,target=/usr/local/go,rw \
--mount=from=osxsdk,target=/xx-sdk,src=/xx-sdk \
--mount=type=bind,from=osxcross,src=/osxsdk,target=/xx-sdk \
OUTDIR=/out BUILDDIR=/build SRCDIR=/usr/local/src/credential-helpers pkg-static-build

FROM builder-static-$TARGETOS AS builder-static
Expand Down
1 change: 1 addition & 0 deletions pkg/credential-helpers/scripts/pkg-static-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ case "$(xx-info os)" in
go install std
set -x
pushd ${SRCDIR}
export "MACOSX_VERSION_MIN=$(make print-MACOSX_DEPLOYMENT_TARGET)"
make build-osxkeychain VERSION="${GENVER_VERSION}" REVISION="${GENVER_COMMIT}" DESTDIR="${BUILDDIR}/${PKG_NAME}"
make build-pass VERSION="${GENVER_VERSION}" REVISION="${GENVER_COMMIT}" DESTDIR="${BUILDDIR}/${PKG_NAME}"
popd
Expand Down

0 comments on commit 932ff3b

Please sign in to comment.