Skip to content

Commit

Permalink
Bump version to v0.17.53
Browse files Browse the repository at this point in the history
  • Loading branch information
niko0xdev committed Jan 20, 2024
1 parent 6f08917 commit 94c9fd6
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.17.52
v0.17.53
14 changes: 13 additions & 1 deletion graphql/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
package graphql

const Version = "v0.17.42-dev"
import (
"log"
"os"
)

func GetVersion() string {
content, err := os.ReadFile(string("../../VERSION"))
if err != nil {
log.Fatal(err)
}

return string(content)
}
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ var versionCmd = &cli.Command{
Name: "version",
Usage: "print the version string",
Action: func(ctx *cli.Context) error {
fmt.Println(graphql.Version)
fmt.Println(graphql.GetVersion())
return nil
},
}
Expand All @@ -210,7 +210,7 @@ func main() {
app.Description = "This is a library for quickly creating strictly typed graphql servers in golang. See https://gqlgen.com/ for a getting started guide."
app.HideVersion = true
app.Flags = generateCmd.Flags
app.Version = graphql.Version
app.Version = graphql.GetVersion()
app.Before = func(context *cli.Context) error {
if context.Bool("verbose") {
log.SetFlags(0)
Expand Down
2 changes: 1 addition & 1 deletion plugin/resolvergen/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ func (m *Plugin) generatePerSchema(data *codegen.Data) error {
)
if !data.Config.OmitGQLGenVersionInFileNotice {
fileNotice.WriteString(` version `)
fileNotice.WriteString(graphql.Version)
fileNotice.WriteString(graphql.GetVersion())
}
}

Expand Down

0 comments on commit 94c9fd6

Please sign in to comment.