From 882c5ee47897afa936257fb76f165b5bd683a44f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Thu, 17 Mar 2022 11:19:00 +0100 Subject: [PATCH] Manager: include the version of Flamenco Manager in the written config --- internal/manager/config/settings.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/manager/config/settings.go b/internal/manager/config/settings.go index d2234781..7da116ac 100644 --- a/internal/manager/config/settings.go +++ b/internal/manager/config/settings.go @@ -12,6 +12,7 @@ import ( "strings" "time" + "git.blender.org/flamenco/internal/appinfo" "github.com/rs/zerolog" "github.com/rs/zerolog/log" yaml "gopkg.in/yaml.v2" @@ -424,13 +425,16 @@ func (c *Conf) Write(filename string) error { if err != nil { return err } - fmt.Fprintln(f, "# Configuration file for Flamenco Manager.") + fmt.Fprintf(f, "# Configuration file for %s.\n", appinfo.ApplicationName) fmt.Fprintln(f, "# For an explanation of the fields, refer to flamenco-manager-example.yaml") fmt.Fprintln(f, "#") fmt.Fprintln(f, "# NOTE: this file will be overwritten by Flamenco Manager's web-based configuration system.") fmt.Fprintln(f, "#") now := time.Now() - fmt.Fprintf(f, "# This file was written on %s\n\n", now.Format("2006-01-02 15:04:05 -07:00")) + fmt.Fprintf(f, "# This file was written on %s by %s\n\n", + now.Format("2006-01-02 15:04:05 -07:00"), + appinfo.FormattedApplicationInfo(), + ) n, err := f.Write(data) if err != nil {