Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version shows v0.0.0 #2489

Closed
1 of 13 tasks
mvoh opened this issue Oct 10, 2023 · 2 comments
Closed
1 of 13 tasks

Version shows v0.0.0 #2489

mvoh opened this issue Oct 10, 2023 · 2 comments
Labels
enhancement New feature or request general

Comments

@mvoh
Copy link

mvoh commented Oct 10, 2023

Which version are you using?

v1.1.1
but how to find out??? :)

Which operating system are you using?

  • Linux amd64 standard
  • Linux amd64 Docker
  • Linux arm64 standard
  • Linux arm64 Docker
  • Linux arm7 standard
  • Linux arm7 Docker
  • Linux arm6 standard
  • Linux arm6 Docker
  • Windows amd64 standard
  • Windows amd64 Docker (WSL backend)
  • macOS amd64 standard
  • macOS amd64 Docker
  • Other (please describe)
$ uname -a
OpenBSD xxxxxxx 7.3 GENERIC.MP#3 amd64

Describe the issue

internal/core/core.go#L27
var version = "v0.0.0"

Describe how to replicate the issue

git clone https://github.com/bluenviron/mediamtx.git
cd mediamtx/
go build .
$ mediamtx --version
v0.0.0
$ mediamtx -h
MediaMTX v0.0.0

Did you attach the server logs?

no

Did you attach a network dump?

no

@aler9 aler9 added enhancement New feature or request general labels Nov 18, 2023
@mvoh mvoh changed the title Version shows v0.0.1 Version shows v0.0.0 Nov 21, 2023
@aler9
Copy link
Member

aler9 commented Jan 19, 2024

Hello, version is currently filled manually by using

go build -ldflags "-X github.com/bluenviron/mediamtx/internal/core.version=vX.X.X"

This is the same approach used by most Golang-based command line utilities like Helm, Kubectl and Skaffold.

The alternatives are:

  • Filling version statically by performing a dedicated commit before every release. This has the disadvantage of introducing an additional task during release, furthermore it doesn't allow to detect custom releases since their version would be the same as standard releases
  • Using a new Golang feature that automatically provides the git revision through BuildInfo, the problem of this is that it's causing troubles in CI/CD systems that strip the .git folder or don't have git installed, and when the executable is installed with go install, furthermore this feature doesn't provide the git tag, but only the alphanumeric revision.

Currently these alternatives cannot be taken into consideration for the reasons explained above.

@aler9 aler9 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 19, 2024
Copy link
Contributor

This issue is being locked automatically because it has been closed for more than 6 months.
Please open a new issue in case you encounter a similar problem.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request general
Projects
None yet
Development

No branches or pull requests

2 participants