@@ -4,7 +4,7 @@ ARG GO_VERSION=1.24.7
4
4
ARG DEBIAN_VERSION=bookworm
5
5
6
6
ARG XX_VERSION=1.7.0
7
- ARG OSXCROSS_VERSION=11.3-r7 -debian
7
+ ARG OSXCROSS_VERSION=11.3-r8 -debian
8
8
ARG GOLANGCI_LINT_VERSION=v2.5
9
9
ARG DEBIAN_FRONTEND=noninteractive
10
10
@@ -99,21 +99,7 @@ FROM gobase AS version
99
99
RUN --mount=target=. \
100
100
echo -n "$(./hack/git-meta version)" | tee /tmp/.version ; echo -n "$(./hack/git-meta revision)" | tee /tmp/.revision
101
101
102
- FROM base AS build-linux
103
- ARG PACKAGE
104
- RUN --mount=type=bind,target=. \
105
- --mount=type=cache,target=/root/.cache \
106
- --mount=type=cache,target=/go/pkg/mod \
107
- --mount=type=bind,source=/tmp/.version,target=/tmp/.version,from=version \
108
- --mount=type=bind,source=/tmp/.revision,target=/tmp/.revision,from=version <<EOT
109
- set -ex
110
- xx-go --wrap
111
- make build-pass build-secretservice PACKAGE=$PACKAGE VERSION=$(cat /tmp/.version) REVISION=$(cat /tmp/.revision) DESTDIR=/out
112
- xx-verify /out/docker-credential-pass
113
- xx-verify /out/docker-credential-secretservice
114
- EOT
115
-
116
- FROM base AS build-darwin
102
+ FROM base AS build
117
103
ARG PACKAGE
118
104
RUN --mount=type=bind,target=. \
119
105
--mount=type=cache,target=/root/.cache \
@@ -124,28 +110,26 @@ RUN --mount=type=bind,target=. \
124
110
set -ex
125
111
export MACOSX_VERSION_MIN=$(make print-MACOSX_DEPLOYMENT_TARGET)
126
112
xx-go --wrap
127
- go install std
128
- make build-osxkeychain build-pass PACKAGE=$PACKAGE VERSION=$(cat /tmp/.version) REVISION=$(cat /tmp/.revision) DESTDIR=/out
129
- xx-verify /out/docker-credential-osxkeychain
130
- xx-verify /out/docker-credential-pass
113
+ case "$(xx-info os)" in
114
+ linux)
115
+ make build-pass build-secretservice PACKAGE=$PACKAGE VERSION=$(cat /tmp/.version) REVISION=$(cat /tmp/.revision) DESTDIR=/out
116
+ xx-verify /out/docker-credential-pass
117
+ xx-verify /out/docker-credential-secretservice
118
+ ;;
119
+ darwin)
120
+ go install std
121
+ make build-osxkeychain build-pass PACKAGE=$PACKAGE VERSION=$(cat /tmp/.version) REVISION=$(cat /tmp/.revision) DESTDIR=/out
122
+ xx-verify /out/docker-credential-osxkeychain
123
+ xx-verify /out/docker-credential-pass
124
+ ;;
125
+ windows)
126
+ make build-wincred PACKAGE=$PACKAGE VERSION=$(cat /tmp/.version) REVISION=$(cat /tmp/.revision) DESTDIR=/out
127
+ mv /out/docker-credential-wincred /out/docker-credential-wincred.exe
128
+ xx-verify /out/docker-credential-wincred.exe
129
+ ;;
130
+ esac
131
131
EOT
132
132
133
- FROM base AS build-windows
134
- ARG PACKAGE
135
- RUN --mount=type=bind,target=. \
136
- --mount=type=cache,target=/root/.cache \
137
- --mount=type=cache,target=/go/pkg/mod \
138
- --mount=type=bind,source=/tmp/.version,target=/tmp/.version,from=version \
139
- --mount=type=bind,source=/tmp/.revision,target=/tmp/.revision,from=version <<EOT
140
- set -ex
141
- xx-go --wrap
142
- make build-wincred PACKAGE=$PACKAGE VERSION=$(cat /tmp/.version) REVISION=$(cat /tmp/.revision) DESTDIR=/out
143
- mv /out/docker-credential-wincred /out/docker-credential-wincred.exe
144
- xx-verify /out/docker-credential-wincred.exe
145
- EOT
146
-
147
- FROM build-$TARGETOS AS build
148
-
149
133
FROM scratch AS binaries
150
134
COPY --from=build /out /
151
135
0 commit comments