Skip to content

Commit 5b3d71a

Browse files
committed
Merge branch 'version-status-php' into ocs-version-update
2 parents 7201def + 4abdde9 commit 5b3d71a

File tree

5 files changed

+27
-2
lines changed

5 files changed

+27
-2
lines changed

extensions/ocdav/pkg/command/server.go

+5
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ func Server(cfg *config.Config) *cli.Command {
5252
ocdav.Prefix(cfg.HTTP.Prefix),
5353
ocdav.GatewaySvc(cfg.Reva.Address),
5454
ocdav.JWTSecret(cfg.TokenManager.JWTSecret),
55+
ocdav.ProductName(cfg.Status.ProductName),
56+
ocdav.Product(cfg.Status.Product),
57+
ocdav.Version(cfg.Status.Version),
58+
ocdav.VersionString(cfg.Status.VersionString),
59+
ocdav.Edition(cfg.Status.Edition),
5560
// ocdav.FavoriteManager() // FIXME needs a proper persistence implementation
5661
// ocdav.LockSystem(), // will default to the CS3 lock system
5762
// ocdav.TLSConfig() // tls config for the http server

extensions/ocdav/pkg/config/config.go

+10
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ type Config struct {
3333
Middleware Middleware `yaml:"middleware"`
3434

3535
Context context.Context `yaml:"-"`
36+
Status Status `yaml:"-"`
3637
}
3738
type Tracing struct {
3839
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;OCDAV_TRACING_ENABLED" desc:"Activates tracing."`
@@ -75,3 +76,12 @@ type Middleware struct {
7576
type Auth struct {
7677
CredentialsByUserAgent map[string]string `yaml:"credentials_by_user_agent"`
7778
}
79+
80+
// Status holds the configurable values for the status.php
81+
type Status struct {
82+
Version string
83+
VersionString string
84+
Product string
85+
ProductName string
86+
Edition string
87+
}

extensions/ocdav/pkg/config/defaults/defaultconfig.go

+8
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package defaults
22

33
import (
44
"github.com/owncloud/ocis/v2/extensions/ocdav/pkg/config"
5+
"github.com/owncloud/ocis/v2/ocis-pkg/version"
56
)
67

78
func FullDefaultConfig() *config.Config {
@@ -42,6 +43,13 @@ func DefaultConfig() *config.Config {
4243
CredentialsByUserAgent: map[string]string{},
4344
},
4445
},
46+
Status: config.Status{
47+
Version: version.String + ".0",
48+
VersionString: version.String,
49+
Product: "ocis",
50+
ProductName: "Infinite Scale",
51+
Edition: "Community",
52+
},
4553
}
4654
}
4755

go.mod

+2
Original file line numberDiff line numberDiff line change
@@ -274,3 +274,5 @@ require (
274274

275275
// we need to use a fork to make the windows build pass
276276
replace github.com/pkg/xattr => github.com/micbar/xattr v0.4.6-0.20220215112335-88e74d648fb7
277+
278+
replace github.com/cs3org/reva/v2 => ../reva

ocis-pkg/version/version.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import (
66

77
var (
88
// String gets defined by the build system.
9-
String = "0.0.0"
9+
String = "2.0.0-dev"
1010

1111
// Date indicates the build date.
12-
Date = "00000000"
12+
Date = time.Now().Format("20060102")
1313
)
1414

1515
// Compiled returns the compile time of this service.

0 commit comments

Comments
 (0)