Skip to content

Commit

Permalink
ci: 独立发布 data 文件夹
Browse files Browse the repository at this point in the history
  • Loading branch information
nopdan committed Aug 29, 2023
1 parent ffe7cf5 commit a796271
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,6 @@ jobs:
args: -fq

- run: |
cp pkg/wubi/data bin/data -r
cp UnicodeCJK-WuBi/CJK.txt bin/data/
cp pinyin-data/pinyin.txt bin/data/
cp pinyin-data/duoyin.txt bin/data/
cp pinyin-data/correct.txt bin/data/
cp README.md bin/
cp CHANGELOG.md bin/
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@

## 使用

**下载 data.zip 并解压,确保 data 文件夹与 rose 程序位于同一目录下。**

```sh
Root Command:
Usage: rose [输入文件] [输入格式]:[输出格式] [保存文件名]
Expand Down
7 changes: 7 additions & 0 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ import (
)

func Cmd() {
_, err := os.Stat("data")
if os.IsNotExist(err) {
fmt.Println("data 文件夹不存在")
fmt.Println("请前往 https://github.com/nopdan/rose/releases 下载")
fmt.Scanln()
os.Exit(1)
}
// 双击打开默认启动服务
switch len(os.Args) {
case 1:
Expand Down

0 comments on commit a796271

Please sign in to comment.