Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
gcslaoli committed Aug 8, 2022
2 parents dfd3ce2 + ba3d482 commit bf6c6a9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- name: Build CLI Binary For All Platform
run: |
gf build main.go -n ${{env.BIN_NAME}} -a all -s linux
gf build main.go -n ${{env.BIN_NAME}} -a all -s all -p ./temp
- name: Move Files Before Release
run: |
cd temp
Expand Down
3 changes: 3 additions & 0 deletions hack/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
# CLI tool, only in development environment.
# https://goframe.org/pages/viewpage.action?pageId=3673173
gfcli:
build:
varMap:
version: "v1.0.1"

4 changes: 4 additions & 0 deletions internal/cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
type sVersion struct {
Name string //程序名称
Homepage string //程序主页
Version string //程序版本
GoFrame string //goframe version
Golang string //golang version
Git string //git commit id
Expand All @@ -25,11 +26,14 @@ var (
Func: func(ctx context.Context, parser *gcmd.Parser) (err error) {
info := gbuild.Info()
// gutil.Dump(info)
data := gbuild.Data()
// gutil.Dump(data)

// 生成sVersion结构体
res := sVersion{
Name: "hjm-certcheck",
Homepage: "https://gitee.com/hjmcloud/hjm-certcheck",
Version: data["version"].(string),
GoFrame: info.GoFrame,
Golang: info.Golang,
Git: info.Git,
Expand Down

0 comments on commit bf6c6a9

Please sign in to comment.