From ff729f50267db61ca39be544a5183289c0ee9b0b Mon Sep 17 00:00:00 2001 From: peefy Date: Tue, 24 Oct 2023 11:03:37 +0800 Subject: [PATCH] chore: adjust makefile and ci scripts Signed-off-by: peefy --- .gitignore | 2 ++ makefile | 6 ++++-- pkg/version/version_test.go | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 955d2ed..1f50d8b 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,8 @@ # Go workspace file go.work +# Go coverage test +coverage.out build/ .vscode/ diff --git a/makefile b/makefile index f820a8d..2d98d27 100644 --- a/makefile +++ b/makefile @@ -1,7 +1,9 @@ VERSION := $(shell cat VERSION) -PKG:= kcl-lang.io/kcl -LDFLAGS := -X $(PKG)/cmd.Version=$(VERSION) +PKG:= kcl-lang.io/cli +LDFLAGS := -X $(PKG)/pkg/version.version=$(VERSION) +COVER_FILE ?= coverage.out +SOURCE_PATHS ?= ./pkg/... GO ?= go diff --git a/pkg/version/version_test.go b/pkg/version/version_test.go index 4798023..2b47922 100644 --- a/pkg/version/version_test.go +++ b/pkg/version/version_test.go @@ -9,7 +9,7 @@ func TestGetVersionInStr(t *testing.T) { }{ { name: "test get version in string", - want: "0.3.6", + want: "0.7.0-alpha.1", }, } for _, tt := range tests {