Skip to content

Commit

Permalink
Merge pull request #62 from radekg/beta.1
Browse files Browse the repository at this point in the history
Towards more capable base client.
  • Loading branch information
radekg authored Jan 12, 2022
2 parents 1e2797e + 85e9d1a commit ad66b98
Show file tree
Hide file tree
Showing 113 changed files with 1,108 additions and 6,487 deletions.
3 changes: 0 additions & 3 deletions .compose/.env

This file was deleted.

126 changes: 0 additions & 126 deletions .compose/yugabytedb-minimal.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.1-alpha.9.1
0.0.1-beta.1
17 changes: 0 additions & 17 deletions Dockerfile

This file was deleted.

24 changes: 3 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,36 +1,18 @@
.DEFAULT_GOAL := build
.DEFAULT_GOAL := test

.PHONY: clean build docker-image test git-tag
.PHONY: clean test git-tag

BINARY ?= ybdb-go-cli
SOURCES = $(shell find . -name '*.go' | grep -v /vendor/)
VERSION ?= $(shell git describe --tags --always --dirty)
GOPKGS = $(shell go list ./... | grep -v /vendor/)
BUILD_FLAGS ?=
LDFLAGS ?= -X github.com/radekg/yugabyte-db-go-client/config.Version=$(VERSION) -w -s
GOARCH ?= amd64
GOOS ?= linux

DOCKER_IMAGE_REPO ?= local/
CURRENT_DIR=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
TAG_VERSION ?= $(shell cat $(CURRENT_DIR)/.version)

TEST_TIMEOUT ?=120s

default: build
default: test

test:
go clean -testcache
go test -timeout ${TEST_TIMEOUT} -cover -v ./...

build: build/$(BINARY)

build/$(BINARY): $(SOURCES)
GOOS=$(GOOS) GOARCH=$(GOARCH) CGO_ENABLED=0 go build -o build/$(BINARY) $(BUILD_FLAGS) -ldflags "$(LDFLAGS)" .

docker-image:
docker build -t $(DOCKER_IMAGE_REPO)$(BINARY):${TAG_VERSION} .

clean:
@rm -rf build

Expand Down
Loading

0 comments on commit ad66b98

Please sign in to comment.