minor changes
This commit is contained in:
parent
e7ff0e8b8d
commit
06feef7559
@ -5,4 +5,4 @@ GIT_COMMIT=`git rev-parse --short HEAD`
|
||||
GIT_BRANCH=`git rev-parse --symbolic-full-name --abbrev-ref HEAD`
|
||||
GIT_DIRTY=`git diff-index --quiet HEAD -- || echo "✗-"`
|
||||
|
||||
go build -o bin/neko -ldflags "-s -X version.buildTime=${BUILD_TIME} -X version.gitRevision=${GIT_DIRTY}${GIT_REVISION} -X version.gitBranch=${GIT_BRANCH}" -i cmd/neko/main.go
|
||||
go build -o bin/neko -ldflags "-s -X 'n.eko.moe/neko.buildDate=${BUILD_TIME}' -X 'n.eko.moe/neko.gitCommit=${GIT_DIRTY}${GIT_COMMIT}' -X 'n.eko.moe/neko.gitBranch=${GIT_BRANCH}'" -i cmd/neko/main.go
|
||||
|
@ -1,8 +1,6 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
@ -32,5 +30,5 @@ func init() {
|
||||
log.Panic().Err(err).Msg("unable to run root command")
|
||||
}
|
||||
|
||||
root.SetVersionTemplate(fmt.Sprintf("version: %s\n", neko.Service.Version))
|
||||
root.SetVersionTemplate(neko.Service.Version.Details())
|
||||
}
|
||||
|
@ -92,11 +92,11 @@ func (m *WebRTCManager) Start() {
|
||||
return
|
||||
case sample := <-videoPipeline.Sample:
|
||||
if err := m.sessions.WriteVideoSample(sample); err != nil {
|
||||
m.logger.Warn().Err(err).Msg("video pipeline failed")
|
||||
m.logger.Warn().Err(err).Msg("video pipeline failed to write")
|
||||
}
|
||||
case sample := <-audioPipeline.Sample:
|
||||
if err := m.sessions.WriteAudioSample(sample); err != nil {
|
||||
m.logger.Warn().Err(err).Msg("audio pipeline failed")
|
||||
m.logger.Warn().Err(err).Msg("audio pipeline failed to write")
|
||||
}
|
||||
case <-m.cleanup.C:
|
||||
hid.Check(time.Second * 10)
|
||||
@ -182,13 +182,12 @@ func (m *WebRTCManager) CreatePeer(id string, sdp string) (string, types.Peer, e
|
||||
return "", nil, err
|
||||
}
|
||||
|
||||
/*
|
||||
// clear the Transceiver bufers
|
||||
go func() {
|
||||
defer func() {
|
||||
m.logger.Warn().Msgf("ReadRTCP shutting down")
|
||||
}()
|
||||
|
||||
/*
|
||||
for {
|
||||
packet, err := videoTransceiver.Sender.ReadRTCP()
|
||||
if err != nil {
|
||||
@ -202,8 +201,8 @@ func (m *WebRTCManager) CreatePeer(id string, sdp string) (string, types.Peer, e
|
||||
}
|
||||
m.logger.Debug().Msgf("aReadRTCP %v", packet)
|
||||
}
|
||||
*/
|
||||
}()
|
||||
*/
|
||||
|
||||
// set remote description
|
||||
connection.SetRemoteDescription(description)
|
||||
|
@ -28,13 +28,12 @@ const Header = `&34
|
||||
|
||||
var (
|
||||
//
|
||||
buildDate = ""
|
||||
buildDate = "dev"
|
||||
//
|
||||
gitCommit = ""
|
||||
gitCommit = "dev"
|
||||
//
|
||||
gitVersion = ""
|
||||
//
|
||||
gitState = ""
|
||||
gitBranch = "dev"
|
||||
|
||||
// Major version when you make incompatible API changes,
|
||||
major = "0"
|
||||
// Minor version when you add functionality in a backwards-compatible manner, and
|
||||
@ -51,9 +50,8 @@ func init() {
|
||||
Major: major,
|
||||
Minor: minor,
|
||||
Patch: patch,
|
||||
GitVersion: gitVersion,
|
||||
GitCommit: gitCommit,
|
||||
GitTreeState: gitState,
|
||||
GitBranch: gitBranch,
|
||||
BuildDate: buildDate,
|
||||
GoVersion: runtime.Version(),
|
||||
Compiler: runtime.Compiler,
|
||||
@ -70,10 +68,8 @@ type Version struct {
|
||||
Major string
|
||||
Minor string
|
||||
Patch string
|
||||
Version string
|
||||
GitVersion string
|
||||
GitCommit string
|
||||
GitTreeState string
|
||||
GitBranch string
|
||||
BuildDate string
|
||||
GoVersion string
|
||||
Compiler string
|
||||
@ -81,7 +77,20 @@ type Version struct {
|
||||
}
|
||||
|
||||
func (i *Version) String() string {
|
||||
return fmt.Sprintf("%s.%s.%s", i.Major, i.Minor, i.Patch)
|
||||
return fmt.Sprintf("%s.%s.%s %s", i.Major, i.Minor, i.Patch, i.GitCommit)
|
||||
}
|
||||
|
||||
func (i *Version) Details() string {
|
||||
return fmt.Sprintf(
|
||||
"%s\n%s\n%s\n%s\n%s\n%s\n%s\n",
|
||||
fmt.Sprintf("Verison %s.%s.%s", i.Major, i.Minor, i.Patch),
|
||||
fmt.Sprintf("GitCommit %s", i.GitCommit),
|
||||
fmt.Sprintf("GitBranch %s", i.GitBranch),
|
||||
fmt.Sprintf("BuildDate %s", i.BuildDate),
|
||||
fmt.Sprintf("GoVersion %s", i.GoVersion),
|
||||
fmt.Sprintf("Compiler %s", i.Compiler),
|
||||
fmt.Sprintf("Platform %s", i.Platform),
|
||||
)
|
||||
}
|
||||
|
||||
type Neko struct {
|
||||
|
Reference in New Issue
Block a user