Skip to content

Commit

Permalink
🔖 发布 v3.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Jan 13, 2020
1 parent 2d43e74 commit c0d11d9
Show file tree
Hide file tree
Showing 8 changed files with 117 additions and 7 deletions.
18 changes: 18 additions & 0 deletions CHANGE_LOGS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## v3.7.0 / 2020-01-13

### 引入特性

* [浏览计数插件化](https://github.com/88250/solo/issues/17)
* [加入社区 IP 黑名单防护](https://github.com/88250/solo/issues/36)

### 改进功能

* [看板娘资源移至社区](https://github.com/88250/solo/issues/34)
* [密码文章后台不允许其他用户查看](https://github.com/88250/solo/issues/35)
* [社区备份全部文章](https://github.com/88250/solo/issues/37)

### 修复缺陷

* [pjax 到文章页面,访问数不会 +1](https://github.com/88250/solo/issues/38)
* [在未开启“允许通过链接访问草稿”时访问草稿报错](https://github.com/88250/solo/issues/40)

## v3.6.8 / 2020-01-03

### 引入特性
Expand Down
2 changes: 1 addition & 1 deletion 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 package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Solo",
"version": "3.6.8",
"version": "3.7.0",
"description": " 一款小而美的博客系统,专为程序员设计。",
"homepage": "https://github.com/88250/solo",
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Description: Solo POM.
Version: 3.18.3.78, Jan 7, 2020
Version: 3.18.3.79, Jan 13, 2020
Author: <a href="http://88250.b3log.org">Liang Ding</a>
Author: <a href="http://www.annpeter.cn">Ann Peter</a>
Author: <a href="http://vanessa.b3log.org">Vanessa</a>
Expand All @@ -16,7 +16,7 @@
<artifactId>solo</artifactId>
<packaging>jar</packaging>
<name>Solo</name>
<version>3.6.8</version>
<version>3.7.0</version>
<description>
一款小而美的博客系统,专为程序员设计。
</description>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/b3log/solo/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
* Server.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 2.0.0.7, Jan 13, 2020
* @version 2.0.0.8, Jan 13, 2020
* @since 1.2.0
*/
public final class Server extends BaseServer {
Expand All @@ -59,7 +59,7 @@ public final class Server extends BaseServer {
/**
* Solo version.
*/
public static final String VERSION = "3.6.8";
public static final String VERSION = "3.7.0";

/**
* Main.
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/org/b3log/solo/service/UpgradeService.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* Upgrade service.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.2.1.14, Jan 3, 2020
* @version 1.2.1.15, Jan 13, 2020
* @since 1.2.0
*/
@Service
Expand Down Expand Up @@ -95,6 +95,8 @@ public void upgrade() {
V366_367.perform();
case "3.6.7":
V367_368.perform();
case "3.6.8":
V368_370.perform();

break;
default:
Expand Down
72 changes: 72 additions & 0 deletions src/main/java/org/b3log/solo/upgrade/V368_370.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/*
* Solo - A small and beautiful blogging system written in Java.
* Copyright (c) 2010-present, b3log.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.b3log.solo.upgrade;

import org.b3log.latke.ioc.BeanManager;
import org.b3log.latke.logging.Level;
import org.b3log.latke.logging.Logger;
import org.b3log.latke.repository.Transaction;
import org.b3log.solo.model.Option;
import org.b3log.solo.repository.OptionRepository;
import org.json.JSONObject;

/**
* Upgrade script from v3.6.8 to v3.7.0.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.0.0, Jan 13, 2020
* @since 3.7.0
*/
public final class V368_370 {

/**
* Logger.
*/
private static final Logger LOGGER = Logger.getLogger(V368_370.class);

/**
* Performs upgrade from v3.6.8 to v3.7.0.
*
* @throws Exception upgrade fails
*/
public static void perform() throws Exception {
final String fromVer = "3.6.8";
final String toVer = "3.7.0";

LOGGER.log(Level.INFO, "Upgrading from version [" + fromVer + "] to version [" + toVer + "]....");

final BeanManager beanManager = BeanManager.getInstance();
final OptionRepository optionRepository = beanManager.getReference(OptionRepository.class);

try {
final Transaction transaction = optionRepository.beginTransaction();

final JSONObject versionOpt = optionRepository.get(Option.ID_C_VERSION);
versionOpt.put(Option.OPTION_VALUE, toVer);
optionRepository.update(Option.ID_C_VERSION, versionOpt);

transaction.commit();

LOGGER.log(Level.INFO, "Upgraded from version [" + fromVer + "] to version [" + toVer + "] successfully");
} catch (final Exception e) {
LOGGER.log(Level.ERROR, "Upgrade failed!", e);

throw new Exception("Upgrade failed from version [" + fromVer + "] to version [" + toVer + "]");
}
}
}
18 changes: 18 additions & 0 deletions src/main/resources/CHANGE_LOGS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## v3.7.0 / 2020-01-13

### 引入特性

* [浏览计数插件化](https://github.com/88250/solo/issues/17)
* [加入社区 IP 黑名单防护](https://github.com/88250/solo/issues/36)

### 改进功能

* [看板娘资源移至社区](https://github.com/88250/solo/issues/34)
* [密码文章后台不允许其他用户查看](https://github.com/88250/solo/issues/35)
* [社区备份全部文章](https://github.com/88250/solo/issues/37)

### 修复缺陷

* [pjax 到文章页面,访问数不会 +1](https://github.com/88250/solo/issues/38)
* [在未开启“允许通过链接访问草稿”时访问草稿报错](https://github.com/88250/solo/issues/40)

## v3.6.8 / 2020-01-03

### 引入特性
Expand Down

0 comments on commit c0d11d9

Please sign in to comment.