-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* move all db related ommands to eponymous subcommand * implement transact command * implement input iteration from * stdin stream * stdin array * multiple command line arguments * verious other fixes * add tests
- Loading branch information
Showing
30 changed files
with
997 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: go-test | ||
on: | ||
push: | ||
workflow_call: | ||
permissions: | ||
contents: read | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.18' | ||
- run: make test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,25 @@ | ||
VERSION=$(shell git describe --tags --always) | ||
GO_SRC=$(shell find . -name "*.go" -not -name "*_test.go") | ||
BINS=tigrisdb-cli | ||
BIN=tigris | ||
|
||
BUILD_PARAM=-tags=release -ldflags "-X 'github.com/tigrisdata/tigrisdb-cli/util.Version=$(VERSION)'" $(shell printenv BUILD_PARAM) | ||
BUILD_PARAM=-tags=release -ldflags "-w -extldflags '-static' -X 'github.com/tigrisdata/tigrisdb-cli/util.Version=$(VERSION)'" -o ${BIN} $(shell printenv BUILD_PARAM) | ||
TEST_PARAM=-cover -race -tags=test $(shell printenv TEST_PARAM) | ||
export GOPRIVATE=github.com/tigrisdata/tigrisdb-client-go | ||
|
||
all: ${BINS} | ||
all: ${BIN} | ||
|
||
${BINS}: ${GO_SRC} go.mod | ||
go build ${BUILD_PARAM} . | ||
${BIN}: ${GO_SRC} go.sum | ||
CGO_ENABLED=0 go build ${BUILD_PARAM} . | ||
|
||
lint: | ||
golangci-lint run | ||
|
||
go.sum: go.mod | ||
go mod download | ||
|
||
test: go.sum lint | ||
test: ${BIN} go.sum | ||
go test $(TEST_PARAM) ./... | ||
/bin/bash tests/*.sh | ||
|
||
clean: | ||
rm -f ${BINS} | ||
rm -f ${BIN} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,5 +25,5 @@ var alterCmd = &cobra.Command{ | |
} | ||
|
||
func init() { | ||
rootCmd.AddCommand(alterCmd) | ||
dbCmd.AddCommand(alterCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.