Browse Source

Fixed not working go ldflag

dependabot/npm_and_yarn/web/prismjs-1.21.0
Max Schmitt 8 years ago
parent
commit
9824676e7b
  1. 2
      handlers/public.go
  2. 2
      static/src/About/About.js
  3. 4
      util/version.go

2
handlers/public.go

@ -143,7 +143,7 @@ func (h *Handler) handleInfo(c *gin.Context) {
out := struct {
util.Info
Providers []string `json:"providers"`
Go string
Go string `json:"go"`
}{
util.VersionInfo,
h.providers,

2
static/src/About/About.js

@ -50,7 +50,7 @@ export default class AboutComponent extends Component {
</Table.Row>
<Table.Row>
<Table.Cell>Node.js Version</Table.Cell>
<Table.Cell>{info.nodeJS.replace("v", "")}</Table.Cell>
<Table.Cell>{info.nodeJS}</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>Yarn Version</Table.Cell>

4
util/version.go

@ -1,5 +1,7 @@
package util
import "strings"
// VersionInfo are the information which will be added at build time
// and shown in the frontend under the about tab
var VersionInfo Info
@ -20,7 +22,7 @@ var (
)
func init() {
VersionInfo.NodeJS = ldFlagNodeJS
VersionInfo.NodeJS = strings.Replace(ldFlagNodeJS, "v", "", 1)
VersionInfo.Commit = ldFlagCommit
VersionInfo.Yarn = ldFlagYarn
VersionInfo.CompilationTime = ldFlagCompilationTime

Loading…
Cancel
Save