From 6a30f844ebd59c070e48dd1be9266e030280e7e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Thu, 6 Jul 2023 12:20:53 +0200 Subject: [PATCH] Manager: Better reporting of version via API call Before: `3.3-alpha0-v3.2-76-gdd34d538-dirty` After : `3.3-alpha0 (v3.2-76-gdd34d538-dirty)` Also include the new `git` property to always have the Git hash (the part between parentheses). --- CHANGELOG.md | 2 +- internal/appinfo/appinfo.go | 2 +- internal/manager/api_impl/meta.go | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 580e32a0..241b1d80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ bugs in actually-released versions. - Fix limitation where a job could have no more than 1000 tasks ([#104201](https://projects.blender.org/studio/flamenco/issues/104201)) - Add support for finding the top-level 'project' directory. When submitting files to Flamenco, the add-on will try to retain the directory structure of your Blender project as precisely as possible. This new feature allows the add-on to find the top-level directory of your project by finding a `.blender_project`, `.git`, or `.subversion` directory. This can be configured in the add-on preferences. - Worker status is remembered when they sign off, so that workers when they come back online do so to the same state ([#99549](https://projects.blender.org/studio/flamenco/issues/99549)). - +- Nicer version display for non-release builds. Instead of `3.3-alpha0-v3.2-76-gdd34d538`, show `3.3-alpha0 (v3.2-76-gdd34d538)`. ## 3.2 - released 2023-02-21 diff --git a/internal/appinfo/appinfo.go b/internal/appinfo/appinfo.go index 218ea013..2fa98ab3 100644 --- a/internal/appinfo/appinfo.go +++ b/internal/appinfo/appinfo.go @@ -44,6 +44,6 @@ func ExtendedVersion() string { case releaseCycleRelease, releaseCycleReleaseCandidate: return ApplicationVersion default: - return fmt.Sprintf("%s-%s", ApplicationVersion, ApplicationGitHash) + return fmt.Sprintf("%s (%s)", ApplicationVersion, ApplicationGitHash) } } diff --git a/internal/manager/api_impl/meta.go b/internal/manager/api_impl/meta.go index 6325b307..6201204a 100644 --- a/internal/manager/api_impl/meta.go +++ b/internal/manager/api_impl/meta.go @@ -26,6 +26,7 @@ func (f *Flamenco) GetVersion(e echo.Context) error { Version: appinfo.ExtendedVersion(), Shortversion: appinfo.ApplicationVersion, Name: appinfo.ApplicationName, + Git: appinfo.ApplicationGitHash, }) }