summaryrefslogtreecommitdiffstats
path: root/cmd/web.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/web.go')
-rw-r--r--cmd/web.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/cmd/web.go b/cmd/web.go
index d92b66d8b6..d760decf5e 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -73,8 +73,13 @@ func checkVersion() {
if err != nil {
log.Fatal(4, "Fail to read 'templates/.VERSION': %v", err)
}
- if string(data) != setting.AppVer {
- log.Fatal(4, "Binary and template file version does not match, did you forget to recompile?")
+ tplVer := string(data)
+ if tplVer != setting.AppVer {
+ if version.Compare(tplVer, setting.AppVer, ">") {
+ log.Fatal(4, "Binary version is lower than template file version, did you forget to recompile Gogs?")
+ } else {
+ log.Fatal(4, "Binary version is higher than template file version, did you forget to update template files?")
+ }
}
// Check dependency version.