Skip to content

Commit

Permalink
tkn version reflects pipeline version
Browse files Browse the repository at this point in the history
fixes #463
  • Loading branch information
waveywaves committed Dec 6, 2019
1 parent 36a80bc commit 3fd3feb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/cmd/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package version
import (
"encoding/json"
"fmt"
"github.com/tektoncd/pipeline/pkg/version"
"io/ioutil"
"log"
"net/http"
Expand All @@ -30,6 +31,7 @@ import (

// NOTE: use go build -ldflags "-X github.com/tektoncd/cli/pkg/cmd/version.clientVersion=$(git describe)"
var clientVersion = devVersion
var pipelineVersion = version.PipelineVersion

const devVersion = "dev"
const latestReleaseURL = "https://api.github.com/repos/tektoncd/cli/releases/latest"
Expand All @@ -46,6 +48,7 @@ func Command() *cobra.Command {
},
RunE: func(cmd *cobra.Command, args []string) error {
fmt.Fprintf(cmd.OutOrStdout(), "Client version: %s\n", clientVersion)
fmt.Fprintf(cmd.OutOrStdout(), "Pipeline version: %s\n", pipelineVersion)

if !check || clientVersion == devVersion {
return nil
Expand Down

0 comments on commit 3fd3feb

Please sign in to comment.