Skip to content

Commit

Permalink
release v1.0.5
Browse files Browse the repository at this point in the history
Signed-off-by: mahjonp <[email protected]>
  • Loading branch information
mahjonp committed Feb 26, 2021
1 parent 08b8347 commit 79bc60e
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 16 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
bin
.idea/
dist/
1 change: 1 addition & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ builds:
goos:
- linux
- darwin
mod_timestamp: '{{ .CommitTimestamp }}'

archives:
- files:
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ PACKAGE_LIST := go list ./...| grep -vE "cmd"
PACKAGES := $$($(PACKAGE_LIST))
FILES_TO_FMT := $(shell find . -path -prune -o -name '*.go' -print)

LDFLAGS += -X "github.com/pingcap/go-tpc/pkg/util.ReleaseVersion=$(shell git describe --tags --dirty --always)"
LDFLAGS += -X "github.com/pingcap/go-tpc/pkg/util.BuildTS=$(shell date -u '+%Y-%m-%d %I:%M:%S')"
LDFLAGS += -X "github.com/pingcap/go-tpc/pkg/util.BuildHash=$(shell git rev-parse HEAD)"
LDFLAGS += -X "main.version=$(shell git describe --tags --dirty --always)"
LDFLAGS += -X "main.commit=$(shell date -u '+%Y-%m-%d %I:%M:%S')"
LDFLAGS += -X "main.date=$(shell git rev-parse HEAD)"

GOBUILD=$(GO) build -ldflags '$(LDFLAGS)'

Expand Down
12 changes: 8 additions & 4 deletions cmd/go-tpc/versioninfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@ import (
"fmt"

"github.com/spf13/cobra"
)

"github.com/pingcap/go-tpc/pkg/util"
var (
version = "dev"
commit = "none"
date = "unknown"
)

func printVersion() {
fmt.Println("Git Commit Hash:", util.BuildHash)
fmt.Println("UTC Build Time:", util.BuildTS)
fmt.Println("Release version:", util.ReleaseVersion)
fmt.Println("Git Commit Hash:", commit)
fmt.Println("UTC Build Time:", date)
fmt.Println("Release version:", version)
}

func registerVersionInfo(root *cobra.Command) {
Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

version=1.0.4
version=1.0.5

case $(uname -s) in
Linux|linux) os=linux ;;
Expand Down
8 changes: 0 additions & 8 deletions pkg/util/versioninfo.go

This file was deleted.

0 comments on commit 79bc60e

Please sign in to comment.