Commit cc1991e8 authored by Liang Ding's avatar Liang Ding

🔖 发布 v3.6.5

parent 26e12029
{
"name": "Solo",
"version": "3.6.4",
"version": "3.6.5",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
......
{
"name": "Solo",
"version": "3.6.4",
"version": "3.6.5",
"description": " 一款小而美的博客系统,专为程序员设计。",
"homepage": "https://github.com/b3log/solo",
"repository": {
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Description: Solo POM.
Version: 3.18.3.70, Sep 11, 2019
Version: 3.18.3.71, Sep 18, 2019
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>
......@@ -16,7 +16,7 @@
<artifactId>solo</artifactId>
<packaging>war</packaging>
<name>Solo</name>
<version>3.6.4</version>
<version>3.6.5</version>
<description>
一款小而美的博客系统,专为程序员设计。
</description>
......
......@@ -59,7 +59,7 @@ import javax.servlet.http.HttpSessionEvent;
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="http://vanessa.b3log.org">Vanessa</a>
* @version 1.11.0.23, Sep 17, 2019
* @version 1.11.0.24, Sep 18, 2019
* @since 0.3.1
*/
public final class SoloServletListener extends AbstractServletListener {
......@@ -72,7 +72,7 @@ public final class SoloServletListener extends AbstractServletListener {
/**
* Solo version.
*/
public static final String VERSION = "3.6.4";
public static final String VERSION = "3.6.5";
/**
* Bean manager.
......
......@@ -30,7 +30,7 @@ import org.json.JSONObject;
* Upgrade service.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.2.1.10, Aug 18, 2019
* @version 1.2.1.11, Sep 18, 2019
* @since 1.2.0
*/
@Service
......@@ -87,6 +87,8 @@ public class UpgradeService {
V362_363.perform();
case "3.6.3":
V363_364.perform();
case "3.6.4":
V364_365.perform();
break;
default:
......
/*
* 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.4 to v3.6.5.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.0.0, Sep 18, 2019
* @since 3.6.5
*/
public final class V364_365 {
/**
* Logger.
*/
private static final Logger LOGGER = Logger.getLogger(V364_365.class);
/**
* Performs upgrade from v3.6.4 to v3.6.5.
*
* @throws Exception upgrade fails
*/
public static void perform() throws Exception {
final String fromVer = "3.6.4";
final String toVer = "3.6.5";
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);
JSONObject hljsOpt = optionRepository.get(Option.ID_C_HLJS_THEME);
hljsOpt.put(Option.OPTION_VALUE, "github");
optionRepository.update(Option.ID_C_HLJS_THEME, hljsOpt);
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 + "]");
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment