Explorar el Código

build: rename build tag miniwinsvc -> minwinsvc

This was in fact a typo.
ᴜɴᴋɴᴡᴏɴ hace 4 años
padre
commit
2e819a360c

+ 1 - 0
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
 

+ 1 - 1
appveyor.yml

@@ -13,4 +13,4 @@ deploy: false
 install:
   - go version
   - go env
-  - go build -v
+  - go build -tags "minwinsvc" -v

+ 1 - 1
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 {

+ 12 - 0
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
+}

+ 2 - 2
internal/setting/miniwinsvc.go → 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
 }

+ 0 - 1
internal/setting/setting.go

@@ -314,7 +314,6 @@ var (
 	// Other settings
 	ShowFooterBranding         bool
 	ShowFooterTemplateLoadTime bool
-	SupportMiniWinService      bool
 
 	// Global setting objects
 	Cfg          *ini.File