Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
35 changed files
with
440 additions
and
931 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/usr/bin/env bash | ||
echo "============================= RELEASE START..." | ||
|
||
## 版本号信息(需要手动指定) | ||
oldVersion="1.0.2" | ||
newVersion="1.0.2" | ||
projectName="metadata" | ||
|
||
# 删除分支 | ||
oldBranchName="release_"${oldVersion} | ||
git branch -d ${oldBranchName} | ||
git push origin --delete ${oldBranchName} | ||
|
||
echo "1. Branch remove success..." | ||
|
||
# 拉取新的分支 | ||
newBranchName="release_"${newVersion} | ||
git branch ${newBranchName} | ||
git checkout ${newBranchName} | ||
git push --set-upstream origin ${newBranchName} | ||
|
||
echo "2. NEW BRANCH DONE." | ||
|
||
# 修改新分支的版本号 | ||
## snapshot 版本号 | ||
snapshot_new_version=${newVersion}"-SNAPSHOT" | ||
mvn versions:set -DgroupId=com.github.houbb -DartifactId=${projectName} -DoldVersion=${release_version} -DnewVersion=${snapshot_new_version} | ||
mvn -N versions:update-child-modules | ||
mvn versions:commit | ||
|
||
git add . | ||
git commit -m "modify branch ${release_version} TO ${snapshot_new_version}" | ||
git push | ||
git status | ||
echo "3. MODIFY ${release_version} TO ${snapshot_new_version} DONE." | ||
|
||
echo "============================= BRANCH RE-CREATE END..." | ||
|
||
echo "============================= BRANCH LIST =============================" | ||
git branch -a | ||
|
||
# 使用方式: | ||
# 注意:本脚本用于删除分支,谨慎使用! | ||
# 1. 赋值权限: chmod +x ./release_rm.sh | ||
# 2. 执行: ./release_rm.sh | ||
# Last Update Time: 2018-06-21 11:10:42 | ||
# Author: houbb | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.github.houbb.opencc4j.core; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* <p> </p> | ||
* | ||
* <pre> Created: 2018/6/22 下午2:41 </pre> | ||
* <pre> Project: opencc4j </pre> | ||
* | ||
* @author houbinbin | ||
* @version 1.0 | ||
* @since JDK 1.7 | ||
*/ | ||
public interface Segment { | ||
|
||
/** | ||
* 分词 | ||
* @param original 原始信息 | ||
* @return 分词后的列表 | ||
*/ | ||
List<String> seg(final String original); | ||
|
||
} |
22 changes: 22 additions & 0 deletions
22
src/main/java/com/github/houbb/opencc4j/core/ZhConvert.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.github.houbb.opencc4j.core; | ||
|
||
/** | ||
* <p> </p> | ||
* | ||
* <pre> Created: 2018/6/22 下午2:42 </pre> | ||
* <pre> Project: opencc4j </pre> | ||
* | ||
* @author houbinbin | ||
* @version 1.0 | ||
* @since JDK 1.7 | ||
*/ | ||
public interface ZhConvert { | ||
|
||
/** | ||
* 对中文进行转化 | ||
* @param original 原始信息 | ||
* @return 转换后的信息 | ||
*/ | ||
String convert(final String original); | ||
|
||
} |
55 changes: 0 additions & 55 deletions
55
src/main/java/com/github/houbb/opencc4j/core/ZhConverter.java
This file was deleted.
Oops, something went wrong.
85 changes: 0 additions & 85 deletions
85
src/main/java/com/github/houbb/opencc4j/core/impl/AbstractZhConverter.java
This file was deleted.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
src/main/java/com/github/houbb/opencc4j/core/impl/CharSegment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.github.houbb.opencc4j.core.impl; | ||
|
||
import com.github.houbb.opencc4j.core.Segment; | ||
import com.github.houbb.paradise.common.util.StringUtil; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
/** | ||
* <p> 简单的转化为 char 列表 </p> | ||
* | ||
* <pre> Created: 2018/6/22 下午2:43 </pre> | ||
* <pre> Project: opencc4j </pre> | ||
* | ||
* @author houbinbin | ||
* @version 1.0 | ||
* @since JDK 1.7 | ||
*/ | ||
public class CharSegment implements Segment { | ||
|
||
@Override | ||
public List<String> seg(String original) { | ||
if(StringUtil.isEmpty(original)) { | ||
return Collections.emptyList(); | ||
} | ||
|
||
char[] chars = original.toCharArray(); | ||
List<String> stringList = new ArrayList<>(); | ||
for(char c : chars) { | ||
stringList.add(String.valueOf(c)); | ||
} | ||
return stringList; | ||
} | ||
|
||
} |
Oops, something went wrong.