Skip to content

Commit

Permalink
Various fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Crone <[email protected]>
  • Loading branch information
chris-crone authored and rumpl committed Oct 23, 2020
1 parent 57a99ce commit affdece
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
# HUB
####
FROM scratch AS hub
COPY --from=build /go/src/github.com/docker/hub-tool/bin/${BINARY_NAME}_* /
ARG BINARY_NAME
COPY --from=build /go/src/github.com/docker/hub-tool/bin/${BINARY_NAME} /${BINARY_NAME}

####
# CROSS_BUILD
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ E2E_ENV:=--env E2E_HUB_USERNAME \
TMPDIR_WIN_PKG:=$(shell mktemp -d)

.PHONY: all
all: lint validate build test
all: build

.PHONY: build
build: ## Build the tool in a container
Expand Down
4 changes: 4 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Docker Hub Tool
Copyright 2020 Docker Hub Tool authors

This product includes software developed at Docker, Inc. (https://www.docker.com).
15 changes: 15 additions & 0 deletions builder.Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2020 Docker Hub Tool authors

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

include vars.mk

NULL:=/dev/null
Expand Down Expand Up @@ -41,6 +55,7 @@ e2e:
test-unit:
$(STATIC_FLAGS) gotestsum $(shell go list ./... | grep -vE '/e2e')

.PHONY:cross
cross:
GOOS=linux GOARCH=amd64 $(STATIC_FLAGS) $(GO_BUILD) -o bin/$(BINARY_NAME)_linux_amd64 ./cmd/$(BINARY_NAME)
GOOS=linux GOARCH=arm64 $(STATIC_FLAGS) $(GO_BUILD) -o bin/$(BINARY_NAME)_linux_arm64 ./cmd/$(BINARY_NAME)
Expand Down
14 changes: 14 additions & 0 deletions vars.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2020 Docker Hub Tool authors

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Pinned Versions
GO_VERSION=1.15.3
ALPINE_VERSION=3.12.0
Expand Down

0 comments on commit affdece

Please sign in to comment.