diff --git a/changelog/fix-compile-date.md b/changelog/fix-compile-date.md new file mode 100644 index 000000000..78f44d154 --- /dev/null +++ b/changelog/fix-compile-date.md @@ -0,0 +1,6 @@ +Bugfix: fix wrong compile date + +We fixed that current date is always printed. + +https://github.com/owncloud/ocis/pull/6132 +https://github.com/owncloud/ocis/issues/6124 \ No newline at end of file diff --git a/ocis-pkg/version/version.go b/ocis-pkg/version/version.go index 80ca46c72..2242347ea 100644 --- a/ocis-pkg/version/version.go +++ b/ocis-pkg/version/version.go @@ -19,7 +19,9 @@ var ( LatestTag = "3.0.0-rc.1+dev" // Date indicates the build date. - Date = time.Now().Format("20060102") + // This has been removed, it looks like you can only replace static strings with recent go versions + //Date = time.Now().Format("20060102") + Date = "dev" // Legacy defines the old long 4 number ownCloud version needed for some clients Legacy = "10.11.0.0" @@ -30,6 +32,9 @@ var ( // Compiled returns the compile time of this service. func Compiled() time.Time { + if Date == "dev" { + return time.Now() + } t, _ := time.Parse("20060102", Date) return t }