Skip to content

Commit

Permalink
[[FIX]] fixed version value
Browse files Browse the repository at this point in the history
  • Loading branch information
suyanlong authored and vipwzw committed Jan 25, 2022
1 parent a863532 commit 7aa99f2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ BUILDTIME:=$(shell date +"%Y-%m-%d %H:%M:%S %A")
VERSION=$(shell git describe --tags || git rev-parse --short=8 HEAD)
GitCommit=$(shell git rev-parse --short=8 HEAD)
BUILD_FLAGS := -ldflags '-X "github.com/bityuan/bityuan/version.GitCommit=$(GitCommit)" \
-X "github.com/33cn/chain33/common/version.GitCommit=$(GitCommit)" \
-X "github.com/bityuan/bityuan/version.Version=$(VERSION)" \
-X "github.com/bityuan/bityuan/version.BuildTime=$(BUILDTIME)"'

Expand Down Expand Up @@ -44,6 +45,7 @@ linux-action-amd64:
tar -zcvf build/$(APP)-$@.tar.gz $(APP)-$@ $(CLI)-$@ CHANGELOG.md bityuan-fullnode.toml bityuan.toml

_GOBUILD := CGO_ENABLED=1 go build -ldflags '-X "github.com/bityuan/bityuan/version.GitCommit=$(GitCommit)" \
-X "github.com/33cn/chain33/common/version.GitCommit=$(GitCommit)" \
-X "github.com/bityuan/bityuan/version.BuildTime=$(BUILDTIME)" -w -s '
linux-amd64:
GOARCH=amd64 GOOS=linux $(_GOBUILD) -o $(APP)-$@ $(SRC)
Expand Down
12 changes: 9 additions & 3 deletions bityuan.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
package main

var bityuan = `
import (
"fmt"

"github.com/bityuan/bityuan/version"
)

var bityuan = fmt.Sprintf(`
TestNet=false
version="6.6.0"
version="%s"
CoinSymbol="bty"
[crypto]
Expand Down Expand Up @@ -307,4 +313,4 @@ ForkUnfreezeIDX= 2270000
[fork.sub.store-kvmvccmavl]
ForkKvmvccmavl=2270000
`
`, version.Version)
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var (
func main() {
flag.Parse()
if *versionCmd {
fmt.Println(fmt.Sprintf("build time: %s", version.BuildTime))
fmt.Println(fmt.Sprintf("Build time: %s", version.BuildTime))
fmt.Println(fmt.Sprintf("System version: %s", version.Platform))
fmt.Println(fmt.Sprintf("Golang version: %s", version.GoVersion))
fmt.Println(fmt.Sprintf("Bityuan version: %s", version.GetVersion()))
Expand Down

0 comments on commit 7aa99f2

Please sign in to comment.