Skip to content

Commit a2d3d09

Browse files
author
杨利兵
committed
更新自动安装功能
1 parent 28b4171 commit a2d3d09

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,18 @@
77
* MSG - 生成多语言资源代码,支持 Android/IOS/JSON/Java/.NET
88

99
## 安装及使用
10-
1. 下载最新版[cg.jar](https://github.com/excel-code-generator/code-generator/releases)
11-
2. 保存cg.jar到适合目录
12-
3. 运行 java -jar path-to-cg.jar xxx
10+
```sh
11+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/excel-code-generator/code-generator/master/install.sh)"
12+
```
13+
将以上命令粘贴至终端。
1314

1415
> Excel模板请参考 [template](template)
1516
1617
## 参数说明
1718
```
1819
用法:cg command file [options]
1920
Commands:
21+
update 检查并更新到最新版本
2022
ddl.mssql 生成SqlServer数据库结构SQL脚本(.ddl)
2123
ddl.mysql 生成MySql数据库结构SQL脚本(.ddl)
2224
ddl.sqlite 生成SQLite数据库结构SQL脚本(.ddl)

message.xlsx

58 Bytes
Binary file not shown.

src/main/java/com/yanglb/codegen/core/parser/BaseParser.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ protected boolean commandHelp() {
7777

7878
List<String> keys = Conf.supportCommands();
7979
Collections.sort(keys);
80+
81+
keys.add(0, "update");
8082
for (String key : keys) {
8183
System.out.println(String.format(" %-23s%s", key, Resources.getString(key)));
8284
}

src/main/resources/message.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ msg.json=\u751F\u6210JSON\u56FD\u9645\u5316\u8D44\u6E90\u6587\u4EF6\uFF08.json\u
88
msg.ios=\u751F\u6210IOS\u56FD\u9645\u5316\u8D44\u6E90\u6587\u4EF6\uFF08.strings\uFF09
99
msg.android=\u751F\u6210Android\u56FD\u9645\u5316\u8D44\u6E90\u6587\u4EF6\uFF08strings.xml\uFF09
1010
msg.prop=\u751F\u6210Java\u56FD\u9645\u5316\u8D44\u6E90\u6587\u4EF6\uFF08.properties\uFF09
11+
update=\u68C0\u67E5\u5E76\u66F4\u65B0\u5230\u6700\u65B0\u7248\u672C
1112

1213
# Error Message
1314
E_001=\u8F6C\u6362%s\u5C5E\u6027\u5931\u8D25\uFF1A%s

0 commit comments

Comments
 (0)