Skip to content

Commit

Permalink
include generate xgo-runtime in git hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
xhd2015 committed Apr 21, 2024
1 parent 38ab395 commit c1e173c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cmd/xgo/runtime_gen/core/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
)

const VERSION = "1.0.25"
const REVISION = "9028d0e560172d8b5c5ccba73491eed2886ddd6c+1"
const NUMBER = 189
const REVISION = "4e07bbae9c2c6c3dc7acf471b763a7fed0fcd66d+1"
const NUMBER = 196

// these fields will be filled by compiler
const XGO_VERSION = ""
Expand Down
4 changes: 2 additions & 2 deletions cmd/xgo/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import "fmt"

const VERSION = "1.0.25"
const REVISION = "c84c8a6b5fa49005a741ff078078c16d317b1709+1"
const NUMBER = 195
const REVISION = "4e07bbae9c2c6c3dc7acf471b763a7fed0fcd66d+1"
const NUMBER = 196

func getRevision() string {
revSuffix := ""
Expand Down
4 changes: 2 additions & 2 deletions runtime/core/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
)

const VERSION = "1.0.25"
const REVISION = "c84c8a6b5fa49005a741ff078078c16d317b1709+1"
const NUMBER = 195
const REVISION = "4e07bbae9c2c6c3dc7acf471b763a7fed0fcd66d+1"
const NUMBER = 196

// these fields will be filled by compiler
const XGO_VERSION = ""
Expand Down
6 changes: 6 additions & 0 deletions script/git-hooks/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ func preCommitCheck(noCommit bool) error {
}
}

// run generate
err = cmd.Dir(rootDir).Run("go", "run", "./script/generate", "xgo-runtime")
if err != nil {
return err
}
files = append(files, filepath.Join("cmd", "xgo", "runtime_gen"))
if !noCommit {
err = cmd.Run("git", append([]string{"add"}, files...)...)
if err != nil {
Expand Down

0 comments on commit c1e173c

Please sign in to comment.