diff --git a/Makefile b/Makefile index 8905a323f2..d4bc7b5304 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ toolcheck: @which buf > /dev/null || (echo "buf not found, please install it from https://docs.buf.build/installation" && exit 1) @which golangci-lint > /dev/null || (echo "golangci-lint not found, run 'go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.61.0'" && exit 1) @which protoc-gen-doc > /dev/null || (echo "protoc-gen-doc not found, run 'go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@v1.5.1'" && exit 1) - @golangci-lint --version | grep "version v\?1.61" > /dev/null || (echo "golangci-lint version must be v1.61 or later [$$(golangci-lint --version)]" && exit 1) + @golangci-lint --version | grep "version v\?1.6[123]" > /dev/null || (echo "golangci-lint version must be v1.61 or later [$$(golangci-lint --version)]" && exit 1) @which goimports >/dev/null || (echo "goimports not found, run 'go install golang.org/x/tools/cmd/goimports@latest'") fix: tidy fmt diff --git a/release-please.json b/release-please.json index 186d7dd674..214618cb26 100644 --- a/release-please.json +++ b/release-please.json @@ -20,10 +20,22 @@ "component": "protocol/go" }, "sdk": { - "component": "sdk" + "component": "sdk", + "extra-files": [ + { + "type": "generic", + "path": "sdk/version.go" + } + ] }, "service": { - "component": "service" + "component": "service", + "extra-files": [ + { + "type": "generic", + "path": "service/cmd/version.go" + } + ] } } } diff --git a/sdk/version.go b/sdk/version.go new file mode 100644 index 0000000000..b804b1a2ec --- /dev/null +++ b/sdk/version.go @@ -0,0 +1,6 @@ +package sdk + +const ( + Version = "0.3.23" // SDK version // x-release-please-version + TDFSpecVersion = "4.2.2" // Vesion of TDF Spec currently targeted by the SDK +) diff --git a/service/cmd/version.go b/service/cmd/version.go new file mode 100644 index 0000000000..3b9114c305 --- /dev/null +++ b/service/cmd/version.go @@ -0,0 +1,16 @@ +package cmd + +import "github.com/spf13/cobra" + +const Version = "0.4.36" // Service Version // x-release-please-version + +func init() { + rootCmd.AddCommand(&cobra.Command{ + Use: "version", + Short: "Platform version information", + RunE: func(cmd *cobra.Command, _ []string) error { + cmd.Println(Version) + return nil + }, + }) +}