Skip to content

Commit

Permalink
chore: tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
mathias-goebel committed Nov 16, 2024
1 parent 8a0cd1b commit ce928f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 23 deletions.
23 changes: 1 addition & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@
# limitations under the License.

NAME ?= auger
PKG ?= github.com/etcd-io/$(NAME)
GO_VERSION ?= 1.23.3
GOOS ?= linux
GOARCH ?= amd64
TEMP_DIR := $(shell mktemp -d)
GOFILES = $(shell find . -name \*.go)
CGO_ENABLED ?= 0

Expand Down Expand Up @@ -48,24 +45,6 @@ test:
@echo Testing
go test ./...

# Dockerized build
release:
@cp -r $(CURDIR) $(TEMP_DIR)
@echo Building release in temp directory $(TEMP_DIR)
docker run \
-v $(TEMP_DIR)/$(NAME):/go/src/$(PKG) \
-w /go/src/$(PKG) \
golang:$(GO_VERSION) \
/bin/bash -c "make -f /go/src/$(PKG)/Makefile release-docker-build GOARCH=$(GOARCH) GOOS=$(GOOS) CGO_ENABLED=$(CGO_ENABLED)"
@mkdir -p build
@cp $(TEMP_DIR)/$(NAME)/$(NAME) build/$(NAME)
@echo build/$(NAME) built!

# Build used inside docker by 'release'
release-docker-build:
export GOPATH=/go
GOOS=$(GOOS) GOARCH=$(GOARCH) CGO_ENABLED=$(CGO_ENABLED) GO111MODULE=on go build -buildvcs=false

clean:
rm -rf build

Expand All @@ -77,4 +56,4 @@ pkg/scheme/scheme.go: ./hack/gen_scheme.sh go.mod
.PHONY: generate
generate: pkg/scheme/scheme.go

.PHONY: build test release release-docker-build clean
.PHONY: build test clean
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Check out and build:
```sh
git clone https://github.com/etcd-io/auger
cd auger
make release
make build
```

Run:
Expand Down

0 comments on commit ce928f6

Please sign in to comment.