Skip to content

Commit

Permalink
Prepare release
Browse files Browse the repository at this point in the history
  • Loading branch information
looly committed Feb 25, 2019
2 parents e2d4bb5 + 8ab8046 commit c3e1dc3
Show file tree
Hide file tree
Showing 81 changed files with 2,624 additions and 672 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,26 @@

-------------------------------------------------------------------------------------------------------------

## 4.5.0

### 新特性
* 【socket】 增加Socket模块
* 【core】 Validator增加isIpV4方法(issue#IRQ6W@Gitee)
* 【crypto】 增加SM2Engine,支持C1C2C3和C1C3C2两种模式
* 【core】 StrUtil.splitTrim支持其它空白符(issue#IRVPC@Gitee)
* 【http】 请求支持DELETE附带参数模式(issue#IRW9E@Gitee)
* 【bloomFilter】调整BitMap注释

### Bug修复
* 【crypto】 修复KeyUtil中使用BC库导致的其它密钥生成异常
* 【core】 修正DateUtil.formatHttpDate方法
* 【extra】 修复FTP.ls无法遍历文件问题(issue#IRTA3@Gitee)
* 【extra】 修复QrCodeUtil中ratio参数失效问题,调整默认纠错为M(感谢@【上海】皮皮今)
* 【core】 修复FileTypeUtil对jpg文件识别问题(issue#275@Github)
* 【cache】 修复cache使用读锁导致的删除节点并发问题(issue#IRZTL@Gitee)

-------------------------------------------------------------------------------------------------------------

## 4.4.5

### 新特性
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Hutool是Hu + tool的自造词,谐音“糊涂”,寓意追求“万事都
- hutool-json JSON实现
- hutool-captcha 图片验证码实现
- hutool-poi 针对POI中Excel的封装
- hutool-socket 基于Java的NIO和AIO的Socket封装

可以根据需求对每个模块单独引入,也可以通过引入`hutool-all`方式引入所有模块。

Expand All @@ -86,21 +87,21 @@ Hutool是Hu + tool的自造词,谐音“糊涂”,寓意追求“万事都
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>4.4.5</version>
<version>4.5.0</version>
</dependency>
```

### Gradle
```
compile 'cn.hutool:hutool-all:4.4.5'
compile 'cn.hutool:hutool-all:4.5.0'
```

### 非Maven项目

点击以下任一链接,下载`hutool-all-X.X.X.jar`即可:

- [Maven中央库1](https://repo1.maven.org/maven2/cn/hutool/hutool-all/4.4.5/)
- [Maven中央库2](http://repo2.maven.org/maven2/cn/hutool/hutool-all/4.4.5/)
- [Maven中央库1](https://repo1.maven.org/maven2/cn/hutool/hutool-all/4.5.0/)
- [Maven中央库2](http://repo2.maven.org/maven2/cn/hutool/hutool-all/4.5.0/)

> 注意
> Hutool只支持JDK7+,对应Android平台没有测试,部分方法并不支持。
Expand Down
34 changes: 34 additions & 0 deletions bin/replaceVersion.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

#-----------------------------------------------------------
# 此脚本用于每次升级Hutool时替换相应位置的版本号
#-----------------------------------------------------------

set -o errexit

pwd=`pwd`

echo "当前路径:${pwd}"

if [ -n "$1" ];then
new_version="$1"
old_version=`cat ${pwd}/bin/version.txt`
echo "$old_version 替换为新版本 $new_version"
else
# 参数错误,退出
echo "ERROR: 请指定新版本!"
exit
fi

if [ ! -n "$old_version" ]; then
echo "ERROR: 旧版本不存在,请确认bin/version.txt中信息正确"
exit
fi

# 替换README.md中的版本
sed -i "s/${old_version}/${new_version}/g" $pwd/README.md
# 替换docs/index.html中的版本
sed -i "s/${old_version}/${new_version}/g" $pwd/docs/index.html

# 保留新版本号
echo "$new_version" > $pwd/bin/version.txt
18 changes: 18 additions & 0 deletions bin/update_version.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
#!/bin/bash

#------------------------------------------------
# 升级Hutool版本,包括:
# 1. 升级pom.xml中的版本号
# 2. 替换README.md和docs中的版本号
#------------------------------------------------

if [ ! -n "$1" ]; then
echo "ERROR: 新版本不存在,请指定参数1"
exit
fi

# 替换所有模块pom.xml中的版本
mvn versions:set -DnewVersion=$1

# 不带-SNAPSHOT的版本号,用于替换其它地方
version=${1%-SNAPSHOT}

# 替换其它地方的版本
`pwd`/bin/replaceVersion.sh "$version"
1 change: 1 addition & 0 deletions bin/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.5.0
Loading

0 comments on commit c3e1dc3

Please sign in to comment.