mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-20 02:00:05 -08:00
fix getting MediaMTX version with go-gin (#4367)
This commit is contained in:
parent
f3af2e78d8
commit
65a2f63081
1 changed files with 3 additions and 1 deletions
|
|
@ -5,6 +5,7 @@ import (
|
|||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
|
|
@ -76,7 +77,8 @@ func tagFromGit() error {
|
|||
// where .git/objects/info/alternates points to a directory outside of the .git directory.
|
||||
//
|
||||
// To work around this, specify an AlternatesFS that allows access to the entire filesystem.
|
||||
storerFs := osfs.New("../../.git", osfs.WithBoundOS())
|
||||
dotGitAbs, _ := filepath.Abs("../../.git")
|
||||
storerFs := osfs.New(dotGitAbs, osfs.WithBoundOS())
|
||||
storer := filesystem.NewStorageWithOptions(storerFs, cache.NewObjectLRUDefault(), filesystem.Options{
|
||||
AlternatesFS: osfs.New("/", osfs.WithBoundOS()),
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue