diff --git a/health/health.go b/health/health.go index 6f5e3567..d87f1662 100644 --- a/health/health.go +++ b/health/health.go @@ -53,12 +53,12 @@ func (b *HealthCheck) Do(ctx context.Context) HealthCheckResult { log.Error().Err(err).Msgf("failed %s healthcheck", name) return HealthCheckResult{ Status: StatusDown, - Version: tork.FormattedVersion(), + Version: tork.Version, } } } return HealthCheckResult{ Status: StatusUp, - Version: tork.FormattedVersion(), + Version: tork.Version, } } diff --git a/internal/coordinator/coordinator.go b/internal/coordinator/coordinator.go index 444701ef..4eae0455 100644 --- a/internal/coordinator/coordinator.go +++ b/internal/coordinator/coordinator.go @@ -260,7 +260,7 @@ func (c *Coordinator) sendHeartbeats() { CPUPercent: cpuPercent, LastHeartbeatAt: time.Now().UTC(), Hostname: hostname, - Version: tork.FormattedVersion(), + Version: tork.Version, }, ) if err != nil { diff --git a/internal/worker/worker.go b/internal/worker/worker.go index f44f0d21..4c0c9707 100644 --- a/internal/worker/worker.go +++ b/internal/worker/worker.go @@ -221,7 +221,7 @@ func (w *Worker) sendHeartbeats() { LastHeartbeatAt: time.Now().UTC(), Hostname: hostname, TaskCount: int(atomic.LoadInt32(&w.taskCount)), - Version: tork.FormattedVersion(), + Version: tork.Version, }, ) if err != nil { diff --git a/version.go b/version.go index 7cb4fb9f..c9a3502a 100644 --- a/version.go +++ b/version.go @@ -1,7 +1,5 @@ package tork -import "fmt" - const ( Version = "0.1.42" ) @@ -9,7 +7,3 @@ const ( var ( GitCommit string = "develop" ) - -func FormattedVersion() string { - return fmt.Sprintf("%s (%s)", Version, GitCommit) -}