aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorᴜɴᴋɴᴡᴏɴ <u@gogs.io>2020-02-20 16:33:03 +0800
committerᴜɴᴋɴᴡᴏɴ <u@gogs.io>2020-02-20 16:33:03 +0800
commit2e819a360c3ef49c2dc69fe2d1521ea823330a1f (patch)
tree902438627f610fb0b00ca177dd3686ef33bd5486
parent1c09373b4f7dbc68154c817b4ee44bfa3b3f637c (diff)
build: rename build tag miniwinsvc -> minwinsvc
This was in fact a typo.
-rw-r--r--CHANGELOG.md1
-rw-r--r--appveyor.yml2
-rw-r--r--internal/route/install.go2
-rw-r--r--internal/setting/computed.go12
-rw-r--r--internal/setting/computed_minwinsvc.go (renamed from internal/setting/miniwinsvc.go)4
-rw-r--r--internal/setting/setting.go1
6 files changed, 17 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8c77c23d..ff2774cc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,6 +16,7 @@ All notable changes to Gogs are documented in this file.
- All assets are now embedded into binary and served from memory by default. Set `[server] LOAD_ASSETS_FROM_DISK = true` to load them from disk. [#5920](https://github.com/gogs/gogs/pull/5920)
- Application and Go versions are removed from page footer and only show in the admin dashboard.
+- Build tag for running as Windows Service has been changed from `miniwinsvc` to `minwinsvc`.
### Fixed
diff --git a/appveyor.yml b/appveyor.yml
index 9a57c21c..e1169985 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -13,4 +13,4 @@ deploy: false
install:
- go version
- go env
- - go build -v
+ - go build -tags "minwinsvc" -v
diff --git a/internal/route/install.go b/internal/route/install.go
index bd51711e..c145fc0b 100644
--- a/internal/route/install.go
+++ b/internal/route/install.go
@@ -81,7 +81,7 @@ func GlobalInit() {
if db.EnableSQLite3 {
log.Info("SQLite3 is supported")
}
- if setting.SupportMiniWinService {
+ if setting.SupportWindowsService() {
log.Info("Builtin Windows Service is supported")
}
if setting.LoadAssetsFromDisk {
diff --git a/internal/setting/computed.go b/internal/setting/computed.go
new file mode 100644
index 00000000..7bdee053
--- /dev/null
+++ b/internal/setting/computed.go
@@ -0,0 +1,12 @@
+// Copyright 2020 The Gogs Authors. All rights reserved.
+// Use of this source code is governed by a MIT-style
+// license that can be found in the LICENSE file.
+
+package setting
+
+var supportWindowsService bool
+
+// SupportWindowsService returns true if running as Windows Service is supported.
+func SupportWindowsService() bool {
+ return supportWindowsService
+}
diff --git a/internal/setting/miniwinsvc.go b/internal/setting/computed_minwinsvc.go
index a7c6890d..27d0ce87 100644
--- a/internal/setting/miniwinsvc.go
+++ b/internal/setting/computed_minwinsvc.go
@@ -1,4 +1,4 @@
-// +build miniwinsvc
+// +build minwinsvc
// Copyright 2015 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
@@ -11,5 +11,5 @@ import (
)
func init() {
- SupportMiniWinService = true
+ supportWindowsService = true
}
diff --git a/internal/setting/setting.go b/internal/setting/setting.go
index fd8d14c0..b95ddbe3 100644
--- a/internal/setting/setting.go
+++ b/internal/setting/setting.go
@@ -314,7 +314,6 @@ var (
// Other settings
ShowFooterBranding bool
ShowFooterTemplateLoadTime bool
- SupportMiniWinService bool
// Global setting objects
Cfg *ini.File