update version

This commit is contained in:
alex 2023-09-09 00:29:56 +08:00
parent 8229005644
commit 507bef0644
2 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@ package common
import "log" import "log"
var ( var (
Version = "v1.7.2" Version = "v1.8.0"
GitHash = "" GitHash = ""
BuildTime = "" BuildTime = ""
GoVersion = "" GoVersion = ""

View File

@ -16,7 +16,7 @@ function go_build() {
if [[ "$1" == "windows" ]]; then if [[ "$1" == "windows" ]]; then
suffix='.exe' suffix='.exe'
fi fi
CGO_ENABLED=0 GOOS=$1 GOARCH=$2 go build -o "${RELEASE_BIN_DIR}${RELEASE_NAME}-$1-$2${suffix}" -ldflags "-w -s -X '${PACKAGE_NAME}.Version=1.0.$(date +%Y%m%d)' -X '${PACKAGE_NAME}.GoVersion=$(go version)' -X '${PACKAGE_NAME}.GitHash=$(git show -s --format=%H)' -X '${PACKAGE_NAME}.BuildTime=$(git show -s --format=%cd)'" ./main.go CGO_ENABLED=0 GOOS=$1 GOARCH=$2 go build -o "${RELEASE_BIN_DIR}${RELEASE_NAME}-$1-$2${suffix}" -ldflags "-w -s -X '${PACKAGE_NAME}.Version=v1.8.$(date +%Y%m%d)' -X '${PACKAGE_NAME}.GoVersion=$(go version)' -X '${PACKAGE_NAME}.GitHash=$(git show -s --format=%H)' -X '${PACKAGE_NAME}.BuildTime=$(git show -s --format=%cd)'" ./main.go
} }
# main # main