mirror of
https://github.com/eiblog/eiblog.git
synced 2026-02-09 16:12:26 +08:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b75f7d6a96 | ||
|
|
5aa8152802 | ||
|
|
1a9628a5dc | ||
|
|
71c02266bc |
14
CHANGELOG.md
14
CHANGELOG.md
@@ -2,6 +2,20 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||||
|
|
||||||
|
### [3.0.10](https://github.com/eiblog/eiblog/compare/v3.0.9...v3.0.10) (2025-11-12)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* default RUN_MODE=prod ([5aa8152](https://github.com/eiblog/eiblog/commit/5aa81528027eca648e430503a1f5a04118ca650e))
|
||||||
|
|
||||||
|
### [3.0.9](https://github.com/eiblog/eiblog/compare/v3.0.8...v3.0.9) (2025-11-12)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* image RUN_MODE ([71c0226](https://github.com/eiblog/eiblog/commit/71c02266bc0173a4af1ffc876dc36051377e1af0))
|
||||||
|
|
||||||
### [3.0.8](https://github.com/eiblog/eiblog/compare/v3.0.7...v3.0.8) (2025-10-14)
|
### [3.0.8](https://github.com/eiblog/eiblog/compare/v3.0.7...v3.0.8) (2025-10-14)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -28,9 +28,12 @@ var Conf Config
|
|||||||
// load config file
|
// load config file
|
||||||
func init() {
|
func init() {
|
||||||
// run mode
|
// run mode
|
||||||
mode := config.RunMode(os.Getenv("RUN_MODE"))
|
mode := config.RunModeProd
|
||||||
if !mode.IsRunMode() {
|
if m := os.Getenv("RUN_MODE"); m != "" {
|
||||||
panic("config: unsupported env RUN_MODE: " + mode)
|
mode = config.RunMode(m)
|
||||||
|
if !mode.IsRunMode() {
|
||||||
|
panic("config: unsupported env RUN_MODE: " + mode)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
logrus.Infof("Run mode:%s", mode)
|
logrus.Infof("Run mode:%s", mode)
|
||||||
|
|
||||||
|
|||||||
@@ -43,9 +43,12 @@ type Config struct {
|
|||||||
// init 初始化配置
|
// init 初始化配置
|
||||||
func init() {
|
func init() {
|
||||||
// run mode
|
// run mode
|
||||||
mode := config.RunMode(os.Getenv("RUN_MODE"))
|
mode := config.RunModeProd
|
||||||
if !mode.IsRunMode() {
|
if rm := os.Getenv("RUN_MODE"); rm != "" {
|
||||||
panic("config: unsupported env RUN_MODE: " + mode)
|
mode = config.RunMode(rm)
|
||||||
|
if !mode.IsRunMode() {
|
||||||
|
panic("config: unsupported env RUN_MODE: " + mode)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
logrus.Infof("Run mode:%s", mode)
|
logrus.Infof("Run mode:%s", mode)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user