Skip to content

Commit

Permalink
auto version
Browse files Browse the repository at this point in the history
  • Loading branch information
yaacov committed Mar 4, 2020
1 parent 072ce74 commit f2d3982
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@
# limitations under the License.
#

VERSION_GIT := $(shell git describe --tags)
VERSION ?= ${VERSION_GIT}

kubesql_cmd := $(wildcard ./cmd/*.go)
kubesql_pkg := $(wildcard ./pkg/cmd/*.go)

all: kubectl-sql

kubectl-sql: $(kubesql_cmd) $(kubesql_pkg)
go build -o kubectl-sql $(kubesql_cmd)
go build -ldflags='-X github.com/yaacov/kubesql/pkg/cmd.clientVersion=${VERSION}' -o kubectl-sql $(kubesql_cmd)

.PHONY: lint
lint:
Expand Down
2 changes: 1 addition & 1 deletion kubesql.spec
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ kubectl-sql let you select Kubernetes resources based on the value of one or mor
mkdir -p ./_build/src/github.com/yaacov
ln -s $(pwd) ./_build/src/github.com/yaacov/kubesql

make
VERSION=%{version} make

%install
install -d %{buildroot}%{_bindir}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
)

var (
clientVersion = "v0.2.1"
clientVersion = "master"

sqlGetLong = `Uses SQL-like language to filter and display one or many resources.
Expand Down

0 comments on commit f2d3982

Please sign in to comment.