mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2025-12-30 17:00:57 -06:00
fix wrong compile date (#6132)
* fix wrong compile date Signed-off-by: Christian Richter <crichter@owncloud.com> * add changelog Signed-off-by: Christian Richter <crichter@owncloud.com> --------- Signed-off-by: Christian Richter <crichter@owncloud.com>
This commit is contained in:
committed by
GitHub
parent
129489203b
commit
b1015b3d2c
6
changelog/fix-compile-date.md
Normal file
6
changelog/fix-compile-date.md
Normal file
@@ -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
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user