Skip to content

Commit

Permalink
🔖 发布 v3.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Jan 16, 2020
1 parent b50216f commit fcb555f
Show file tree
Hide file tree
Showing 9 changed files with 150 additions and 18 deletions.
19 changes: 19 additions & 0 deletions CHANGE_LOGS.md
@@ -1,3 +1,22 @@
## v3.8.0 / 2020-01-16

### 引入特性

* [评论社区组件化](https://github.com/88250/solo/issues/18)

### 改进皮肤

* [皮肤 Casper 标签页标题显示异常](https://github.com/88250/solo/issues/43)

### 改进功能

* [移除计数相关数据填充和功能](https://github.com/88250/solo/issues/45)

### 修复缺陷

* [Jar 包运行时皮肤目录名问题](https://github.com/88250/solo/issues/41)
* [自定义表前缀后存档 404](https://github.com/88250/solo/issues/42)

## v3.7.0 / 2020-01-13

### 引入特性
Expand Down
45 changes: 32 additions & 13 deletions 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
@@ -1,6 +1,6 @@
{
"name": "Solo",
"version": "3.7.0",
"version": "3.8.0",
"description": " 一款小而美的博客系统,专为程序员设计。",
"homepage": "https://github.com/88250/solo",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -16,7 +16,7 @@
<artifactId>solo</artifactId>
<packaging>jar</packaging>
<name>Solo</name>
<version>3.7.0</version>
<version>3.8.0</version>
<description>
一款小而美的博客系统,专为程序员设计。
</description>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/b3log/solo/Server.java
Expand Up @@ -60,7 +60,7 @@ public final class Server extends BaseServer {
/**
* Solo version.
*/
public static final String VERSION = "3.7.0";
public static final String VERSION = "3.8.0";

/**
* Main.
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/org/b3log/solo/service/UpgradeService.java
Expand Up @@ -31,7 +31,7 @@
* Upgrade service.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.2.1.15, Jan 13, 2020
* @version 1.2.1.16, Jan 16, 2020
* @since 1.2.0
*/
@Service
Expand Down Expand Up @@ -98,6 +98,8 @@ public void upgrade() {
V367_368.perform();
case "3.6.8":
V368_370.perform();
case "3.7.0":
V370_380.perform();

break;
default:
Expand Down
73 changes: 73 additions & 0 deletions src/main/java/org/b3log/solo/upgrade/V370_380.java
@@ -0,0 +1,73 @@
/*
* 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.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.b3log.latke.ioc.BeanManager;
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.7.0 to v3.8.0.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.0.0, Jan 16, 2020
* @since 3.8.0
*/
public final class V370_380 {

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

/**
* Performs upgrade from v3.7.0 to v3.8.0.
*
* @throws Exception upgrade fails
*/
public static void perform() throws Exception {
final String fromVer = "3.7.0";
final String toVer = "3.8.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 + "]");
}
}
}
19 changes: 19 additions & 0 deletions src/main/resources/CHANGE_LOGS.md
@@ -1,3 +1,22 @@
## v3.8.0 / 2020-01-16

### 引入特性

* [评论社区组件化](https://github.com/88250/solo/issues/18)

### 改进皮肤

* [皮肤 Casper 标签页标题显示异常](https://github.com/88250/solo/issues/43)

### 改进功能

* [移除计数相关数据填充和功能](https://github.com/88250/solo/issues/45)

### 修复缺陷

* [Jar 包运行时皮肤目录名问题](https://github.com/88250/solo/issues/41)
* [自定义表前缀后存档 404](https://github.com/88250/solo/issues/42)

## v3.7.0 / 2020-01-13

### 引入特性
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/skins/Finding/css/base.css

Large diffs are not rendered by default.

0 comments on commit fcb555f

Please sign in to comment.