Rename xcli to cross

This commit is contained in:
Djordje Lukic 2020-05-04 10:32:30 +02:00
parent eee9bf449f
commit 9fd5f7bef3
3 changed files with 9 additions and 9 deletions

View File

@ -27,9 +27,9 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
GOARCH=${TARGET_ARCH} \ GOARCH=${TARGET_ARCH} \
make -f builder.Makefile cli make -f builder.Makefile cli
FROM make-protos AS make-xcli FROM make-protos AS make-cross
RUN --mount=type=cache,target=/root/.cache/go-build \ RUN --mount=type=cache,target=/root/.cache/go-build \
make -f builder.Makefile xcli make -f builder.Makefile cross
FROM scratch AS protos FROM scratch AS protos
COPY --from=make-protos /go/src/github.com/docker/api . COPY --from=make-protos /go/src/github.com/docker/api .
@ -37,8 +37,8 @@ COPY --from=make-protos /go/src/github.com/docker/api .
FROM scratch AS cli FROM scratch AS cli
COPY --from=make-cli /go/src/github.com/docker/api/bin/* . COPY --from=make-cli /go/src/github.com/docker/api/bin/* .
FROM scratch AS xcli FROM scratch AS cross
COPY --from=make-xcli /go/src/github.com/docker/api/bin/* . COPY --from=make-cross /go/src/github.com/docker/api/bin/* .
FROM make-protos as test FROM make-protos as test
RUN make -f builder.Makefile test RUN make -f builder.Makefile test

View File

@ -44,10 +44,10 @@ cli:
--build-arg TARGET_ARCH=${GOARCH} \ --build-arg TARGET_ARCH=${GOARCH} \
--target cli --target cli
xcli: cross:
@docker build . \ @docker build . \
--output type=local,dest=./bin \ --output type=local,dest=./bin \
--target xcli --target cross
test: test:
@docker build . \ @docker build . \
@ -58,4 +58,4 @@ cache-clear:
FORCE: FORCE:
.PHONY: all protos cli xcli .PHONY: all protos cli cross

View File

@ -40,7 +40,7 @@ protos:
cli: cli:
GOOS=${GOOS} GOARCH=${GOARCH} go build -v -o bin/docker ./cli GOOS=${GOOS} GOARCH=${GOARCH} go build -v -o bin/docker ./cli
xcli: cross:
@GOOS=linux GOARCH=amd64 go build -v -o bin/docker-linux-amd64 ./cli @GOOS=linux GOARCH=amd64 go build -v -o bin/docker-linux-amd64 ./cli
@GOOS=darwin GOARCH=amd64 go build -v -o bin/docker-darwin-amd64 ./cli @GOOS=darwin GOARCH=amd64 go build -v -o bin/docker-darwin-amd64 ./cli
@GOOS=windows GOARCH=amd64 go build -v -o bin/docker-windows-amd64.exe ./cli @GOOS=windows GOARCH=amd64 go build -v -o bin/docker-windows-amd64.exe ./cli
@ -50,4 +50,4 @@ test:
FORCE: FORCE:
.PHONY: all protos cli xcli .PHONY: all protos cli cross