jech / galene

The Galène videoconference server
https://galene.org
MIT License
900 stars 119 forks source link

Show the version in the gui #114

Open gedw99 opened 2 years ago

gedw99 commented 2 years ago

Noticed a lot of small bugs from people being reported.

Mit might be a good idea to have a page or something that shows:

Version of build ( githash ) User agent

you could even add a button that creates an issue and passes that data perhaps but that maybe not needed.

jech commented 2 years ago

Yes, it would be a good idea. It should also be shown at startup.

Unfortunately, I don't think it is possible with current versions of Go. The runtime/debug.BuildInfo function does not return useful information about the main module, only about dependencies. So I don't know how to do that in a portable way (recall that Galene builds fine on Windows, which does not necessarily have make or a sane shell).

jech commented 2 years ago

In Go-1.18, due in December, runtime/debug.BuildInfo provides information about the git hash from which Galene has been built. Perhaps something can be done with that, at least when Galene is built from a Git repository.

gedw99 commented 2 years ago

Just have a version.go file

and at compile time populate it

it a very common pattern used in golang .

ld flags can also be used but I don’t think you can read them at runtime.

jech commented 2 years ago

@gedw99 I could be wrong, but I don't think that go build supports running arbitrary code at build time. How do you suggest the version.go file should be generated?

UnSeulT commented 2 years ago

Found this about auto build versioning, seems to answer the question : https://www.atatus.com/blog/golang-auto-build-versioning/

cvmiller commented 2 years ago

Please add me to this issue. It would be nice to see a human readable version, either in the GUI or on the command line at start up. It makes raising issues, and you debugging them, much easier.

gedw99 commented 2 years ago

@jech here is an example: https://github.com/alda-lang/alda/blob/master/client/gen/version/main.go

i only had time to have a brief look. Maybe it helps !!

jech commented 2 years ago

Alda is compiled using a Unix script:

https://github.com/alda-lang/alda/blob/master/client/bin/build

That script runs the code that you point at to generate the version file at compile time. This makes Alda impossible to cross-compile, at least out of the box, and impossible to build under Windows.

Compare this with Galene, which cross-compiles easily and builds under Windows without requiring a compatible shell.

gedw99 commented 2 years ago

hey @jech

ah i see. Ok maybe this helps : https://github.com/oligot/go-mod-upgrade/issues/19

jech commented 2 years ago

Ok maybe this helps : oligot/go-mod-upgrade#19

This seems to depend on Taskfile. Let me stress once again that Galene can be built using just go build, and I like it that way.

gedw99 commented 2 years ago

@jech i dont think it is dependent on Task file.

https://github.com/oligot/go-mod-upgrade does not have one.

jech commented 1 year ago

Waiting on https://github.com/golang/go/issues/50603.

gedw99 commented 8 months ago

I used this: https://github.com/greenpau/versioned

Will try to make a PR, but got some issues with runtime at the moment with Caddy Reverse proxy and auth.