Skip to content

Commit

Permalink
🔖 发布 v2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Sep 10, 2020
1 parent 97d6516 commit 60b8d6f
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 6 deletions.
21 changes: 21 additions & 0 deletions changelogs.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
## v2.1.0 / 2020-09-10

### 引入特性

* [支持类似 Typora 的即时渲染模式(保留 Markdown 标记符)](https://github.com/88250/pipe/issues/22)

### 改进功能

* [社区图床更换新域名](https://github.com/88250/pipe/issues/9)
* [支持 PostgreSQL 数据库](https://github.com/88250/pipe/issues/31)
* [社区端域名变更](https://github.com/88250/pipe/issues/44)

### 文档相关

* [Add README in English](https://github.com/88250/pipe/issues/30)

### 修复缺陷

* [修复登录验证安全漏洞](https://github.com/88250/pipe/issues/37)
* [编辑文章报错](https://github.com/88250/pipe/issues/43)

## v2.0.0 / 2020-04-09

### 引入特性
Expand Down
2 changes: 1 addition & 1 deletion console/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion console/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pipe-admin",
"version": "2.0.0",
"version": "2.1.0",
"author": {
"name": "B3log 开源社区",
"email": "os@b3log.org",
Expand Down
2 changes: 1 addition & 1 deletion model/confs.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
var logger = gulu.Log.NewLogger(os.Stdout)

// Version of Pipe.
const Version = "2.0.0"
const Version = "2.1.0"

// Conf of Pipe.
var Conf *Configuration
Expand Down
2 changes: 1 addition & 1 deletion pipe.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"Server": "http://localhost:5897",
"StaticServer": "",
"StaticResourceVersion": "1599667421724",
"StaticResourceVersion": "1599703185221",
"RuntimeMode": "dev",
"LogLevel": "debug",
"ShowSQL": false,
Expand Down
26 changes: 26 additions & 0 deletions service/upgradesrv.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,37 @@ func (srv *upgradeService) Perform() {
fallthrough
case "1.9.1":
perform191_200()
fallthrough
case "2.0.0":
perform200_210()
default:
logger.Fatalf("please upgrade to v1.8.7 first")
}
}

func perform200_210() {
fromVer := "2.0.0"
logger.Infof("upgrading from version [" + fromVer + "] to version [" + model.Version + "]....")

var verSettings []model.Setting
if err := db.Model(&model.Setting{}).Where("name = ?", model.SettingNameSystemVer).Find(&verSettings).Error; nil != err {
logger.Fatalf("load settings failed: %s", err)
}

tx := db.Begin()
for _, setting := range verSettings {
setting.Value = model.Version
if err := tx.Save(setting).Error; nil != err {
tx.Rollback()

logger.Fatalf("update setting [%+v] failed: %s", setting, err.Error())
}
}
tx.Commit()

logger.Infof("upgraded from version [" + fromVer + "] to version [" + model.Version + "] successfully")
}

func perform191_200() {
fromVer := "1.9.1"
logger.Infof("upgrading from version [" + fromVer + "] to version [" + model.Version + "]....")
Expand Down
2 changes: 1 addition & 1 deletion theme/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion theme/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pipe",
"version": "2.0.0",
"version": "2.1.0",
"description": "Pipe theme",
"homepage": "https://github.com/88250/pipe",
"repository": {
Expand Down

0 comments on commit 60b8d6f

Please sign in to comment.